|
|
|
@ -34,50 +34,10 @@ class _LoginState extends State<Login> {
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<bool> onWillPop() async {
|
|
|
|
|
final shouldPop = await showDialog<bool>(context: context, builder: (context) {
|
|
|
|
|
return AlertDialog(
|
|
|
|
|
title: const Text('Do you want to exit app?',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: primaryColor,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
)),
|
|
|
|
|
actionsAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
actions: [
|
|
|
|
|
TextButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
SystemNavigator.pop();
|
|
|
|
|
},
|
|
|
|
|
child: const Text('Yes',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: primaryColor,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
TextButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pop(false);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('No',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: primaryColor,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
return shouldPop!;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
String lastInputValue="";
|
|
|
|
|
|
|
|
|
|
return WillPopScope(
|
|
|
|
|
onWillPop: () async => onWillPop(),
|
|
|
|
|
child: Scaffold(
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
body: Stack(
|
|
|
|
|
children: <Widget>[
|
|
|
|
@ -112,8 +72,8 @@ class _LoginState extends State<Login> {
|
|
|
|
|
textCapitalization: TextCapitalization.sentences,
|
|
|
|
|
maxLength: 10,
|
|
|
|
|
decoration: textFormFieldDecoration(Icons.phone,'Mobile Number'),
|
|
|
|
|
style:fontTextStyle(14,Color(0XFF101214),FontWeight.w400),
|
|
|
|
|
cursorColor: Color(0XFF1D7AFC),
|
|
|
|
|
style:fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
|
|
|
|
|
cursorColor: Color(0XFF8270DB),
|
|
|
|
|
|
|
|
|
|
//TextStyle(color: Colors.black,fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
@ -122,7 +82,7 @@ class _LoginState extends State<Login> {
|
|
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
cursorColor:Color(0XFF1D7AFC),
|
|
|
|
|
cursorColor:Color(0XFF8270DB),
|
|
|
|
|
obscureText: isObscureText,
|
|
|
|
|
obscuringCharacter: '*',
|
|
|
|
|
controller: passwordController,
|
|
|
|
@ -138,7 +98,7 @@ class _LoginState extends State<Login> {
|
|
|
|
|
width: 1, )),
|
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(4.0),
|
|
|
|
|
borderSide: BorderSide(color: Color(0XFF1D7AFC),width: 2,),
|
|
|
|
|
borderSide: BorderSide(color: Color(0XFF8270DB),width: 2,),
|
|
|
|
|
),
|
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(4.0),
|
|
|
|
@ -161,7 +121,7 @@ class _LoginState extends State<Login> {
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
style: fontTextStyle(14,Color(0XFF101214),FontWeight.w400),
|
|
|
|
|
style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -261,7 +221,6 @@ class _LoginState extends State<Login> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|