From f8063e1b313a514f8fe81bb024ed50c501b6702a Mon Sep 17 00:00:00 2001 From: marcoabat Date: Sat, 12 Aug 2023 13:04:10 +0200 Subject: [PATCH] updated login page for mobile use --- lib/pages/login_page.dart | 45 ++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index 55a03aa..ecf798f 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -37,7 +37,7 @@ class _LoginPageState extends State { ), Align( alignment: Alignment.topCenter, - child: _tilteBuilder(screenSize.width, context)), + child: _tilteBuilder(screenSize, context)), Scaffold( backgroundColor: Colors.transparent, body: Center( @@ -90,8 +90,8 @@ class _LoginPageState extends State { } } -Widget _tilteBuilder(double screenWidth, BuildContext context) { - if (screenWidth > 840) { +Widget _tilteBuilder(Size screenSize, BuildContext context) { + if (screenSize.width > 840) { return Row( mainAxisSize: MainAxisSize.min, children: [ @@ -127,7 +127,7 @@ Widget _tilteBuilder(double screenWidth, BuildContext context) { ) ], ); - } else { + } else if (screenSize.width <= 840 && screenSize.height > 825) { return Column( children: [ Text( @@ -139,7 +139,7 @@ Widget _tilteBuilder(double screenWidth, BuildContext context) { ), ), Padding( - padding: const EdgeInsets.symmetric(vertical: 15), + padding: const EdgeInsets.symmetric(vertical: 10), child: Image.network( 'https://vkyxfurwyfjfvjlseegf.supabase.co/storage/v1/object/sign/assets/logo.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhc3NldHMvbG9nby5wbmciLCJpYXQiOjE2OTE1OTUyNTcsImV4cCI6MTcyMzEzMTI1N30.EZeMK8bfz83jk1ELdPga0VhyedwZ4ZKDsUEGPR0QBBM&t=2023-08-09T15%3A34%3A17.513Z', width: 150, @@ -155,5 +155,40 @@ Widget _tilteBuilder(double screenWidth, BuildContext context) { ) ], ); + } else { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Image.network( + 'https://vkyxfurwyfjfvjlseegf.supabase.co/storage/v1/object/sign/assets/logo.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhc3NldHMvbG9nby5wbmciLCJpYXQiOjE2OTE1OTUyNTcsImV4cCI6MTcyMzEzMTI1N30.EZeMK8bfz83jk1ELdPga0VhyedwZ4ZKDsUEGPR0QBBM&t=2023-08-09T15%3A34%3A17.513Z', + height: 100, + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'BRISEN', + style: Theme.of(context).textTheme.displayMedium!.copyWith( + fontFamily: 'Summerbreeze', + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + Text( + 'CHECKER', + style: Theme.of(context).textTheme.displayMedium!.copyWith( + fontFamily: 'Summerbreeze', + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ) + ], + ), + ], + ); } }