login ui
This commit is contained in:
50
lib/screen/login_screen/login.dart
Normal file
50
lib/screen/login_screen/login.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:westone_kurirapp/app/constant.dart';
|
||||
import 'package:westone_kurirapp/screen/login_screen/login_box.dart';
|
||||
|
||||
class LoginScreen extends HookConsumerWidget {
|
||||
const LoginScreen({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: true,
|
||||
body: ListView(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.5,
|
||||
child: DecoratedBox(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"lib/images/login.png",
|
||||
),
|
||||
scale: 10,
|
||||
fit: BoxFit.fill)),
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: Constant.getActualY(context: context, y: 21),
|
||||
left: Constant.getActualX(context: context, x: 22),
|
||||
),
|
||||
alignment: Alignment.topLeft,
|
||||
child: Image(
|
||||
image: const AssetImage('lib/images/logo.png'),
|
||||
width: Constant.getActualX(context: context, x: 132),
|
||||
))),
|
||||
),
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height * 0.5,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Constant.primaryLighten, Colors.white],
|
||||
begin: Alignment.center,
|
||||
end: Alignment.topCenter)),
|
||||
child: const LoginBox(),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user