update to 3.13
This commit is contained in:
@ -11,6 +11,8 @@ class LoginPage extends StatelessWidget {
|
||||
TextEditingController emailController = TextEditingController();
|
||||
TextEditingController passwordController = TextEditingController();
|
||||
|
||||
LoginPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -22,11 +24,11 @@ class LoginPage extends StatelessWidget {
|
||||
leading:
|
||||
IconButton( onPressed: (){
|
||||
Navigator.pop(context);
|
||||
},icon:Icon(Icons.arrow_back_ios,size: 20,color: Colors.black,)),
|
||||
},icon:const Icon(Icons.arrow_back_ios,size: 20,color: Colors.black,)),
|
||||
),
|
||||
body:
|
||||
indexController.currentUser.length == 0 ?
|
||||
Container(
|
||||
indexController.currentUser.isEmpty ?
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@ -37,16 +39,16 @@ class LoginPage extends StatelessWidget {
|
||||
children: [
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height/6,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
image:DecorationImage(image: AssetImage('assets/images/login_image.jpg'))
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5,),
|
||||
const SizedBox(height: 5,),
|
||||
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 40
|
||||
),
|
||||
child: Column(
|
||||
@ -57,9 +59,9 @@ class LoginPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 40),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 3,left: 3),
|
||||
padding: const EdgeInsets.only(top: 3,left: 3),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
),
|
||||
@ -74,7 +76,7 @@ class LoginPage extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(40)
|
||||
),
|
||||
child: CircularProgressIndicator(),
|
||||
child: const CircularProgressIndicator(),
|
||||
) :
|
||||
Column(
|
||||
children: [
|
||||
@ -86,9 +88,9 @@ class LoginPage extends StatelessWidget {
|
||||
Get.snackbar(
|
||||
"no_values".tr,
|
||||
"email_and_password_required".tr,
|
||||
icon: Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
|
||||
icon: const Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
|
||||
snackPosition: SnackPosition.TOP,
|
||||
duration: Duration(milliseconds: 800),
|
||||
duration: const Duration(milliseconds: 800),
|
||||
backgroundColor: Colors.yellow,
|
||||
//icon:Image(image:AssetImage("assets/images/dora.png"))
|
||||
);
|
||||
@ -101,12 +103,12 @@ class LoginPage extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(40)
|
||||
),
|
||||
child: Text("ログイン",style: TextStyle(
|
||||
child: const Text("ログイン",style: TextStyle(
|
||||
fontWeight: FontWeight.w600,fontSize: 16,color: Colors.white70
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5.0,),
|
||||
const SizedBox(height: 5.0,),
|
||||
MaterialButton(
|
||||
minWidth: double.infinity,
|
||||
height:40,
|
||||
@ -117,12 +119,12 @@ class LoginPage extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(40)
|
||||
),
|
||||
child: Text("sign_up".tr,style: TextStyle(
|
||||
child: Text("sign_up".tr,style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,fontSize: 16,color: Colors.white70
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 2.0,),
|
||||
const SizedBox(height: 2.0,),
|
||||
MaterialButton(
|
||||
minWidth: double.infinity,
|
||||
height:40,
|
||||
@ -133,7 +135,7 @@ class LoginPage extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(40)
|
||||
),
|
||||
child: Text("cancel".tr,style: TextStyle(
|
||||
child: Text("cancel".tr,style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,fontSize: 16,color: Colors.white70
|
||||
),
|
||||
),
|
||||
@ -144,14 +146,14 @@ class LoginPage extends StatelessWidget {
|
||||
),
|
||||
)
|
||||
),
|
||||
SizedBox(height: 5,),
|
||||
const SizedBox(height: 5,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text("rogaining_user_need_tosign_up".tr, style: TextStyle(
|
||||
child: Text("rogaining_user_need_tosign_up".tr, style: const TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),),
|
||||
),
|
||||
@ -164,7 +166,7 @@ class LoginPage extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text("app_developed_by_gifu_dx".tr, style: TextStyle(
|
||||
child: Text("app_developed_by_gifu_dx".tr, style: const TextStyle(
|
||||
overflow: TextOverflow.ellipsis, fontSize: 10.0
|
||||
),),
|
||||
),
|
||||
@ -182,7 +184,7 @@ class LoginPage extends StatelessWidget {
|
||||
onPressed: (){
|
||||
indexController.currentUser.clear();
|
||||
},
|
||||
child: Text("Already Logged in, Click to logout"),
|
||||
child: const Text("Already Logged in, Click to logout"),
|
||||
),
|
||||
)
|
||||
,
|
||||
@ -194,17 +196,17 @@ Widget makeInput({label, required TextEditingController controller, obsureText =
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(label,style:TextStyle(
|
||||
Text(label,style:const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black87
|
||||
),),
|
||||
SizedBox(height: 5,),
|
||||
const SizedBox(height: 5,),
|
||||
TextField(
|
||||
controller: controller,
|
||||
obscureText: obsureText,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 0,horizontal: 10),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 0,horizontal: 10),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: (Colors.grey[400])!,
|
||||
@ -216,7 +218,7 @@ Widget makeInput({label, required TextEditingController controller, obsureText =
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.0,)
|
||||
const SizedBox(height: 30.0,)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user