From 7e1ad684338a94023c36a4e33f968af5a515e50c Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Fri, 31 Jan 2025 12:13:03 +0800 Subject: [PATCH] update --- lib/pages/login_page.dart | 26 ++++++++++++++------------ lib/widgets/menu_widget.dart | 34 ++++++++++++++++++---------------- lib/widgets/text_widget.dart | 2 +- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index ee205ed..94b5385 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -109,17 +109,16 @@ class _LoginPageState extends State { child: Container( padding: EdgeInsets.all(32), decoration: BoxDecoration( - color: const Color.fromARGB(219, 38, 17, 46), - borderRadius: BorderRadius.all(Radius.circular(16)), - // boxShadow: [ - // BoxShadow( - // color: const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.4), // Subtle shadow to give depth - // spreadRadius: 0, - // blurRadius: 4, - // offset: Offset(0, 2), - // ) - // ] - ), + color: const Color.fromRGBO(38, 17, 46, 0.859), + borderRadius: BorderRadius.all(Radius.circular(16)), + boxShadow: [ + BoxShadow( + color: const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.4), // Subtle shadow to give depth + spreadRadius: 0, + blurRadius: 4, + offset: Offset(0, 2), + ) + ]), child: Form( child: Column( children: [ @@ -140,7 +139,10 @@ class _LoginPageState extends State { ), const Gap(24), // TextButton(onPressed: () => {_signIn()}, child: const Text('Login')) - ButtonWidget(text: 'Login', onPressed: _signIn) + if (_isLoading) + Center(child: CircularProgressIndicator(color: Colors.white)) + else + ButtonWidget(text: 'Login', onPressed: _signIn) ], )), ), diff --git a/lib/widgets/menu_widget.dart b/lib/widgets/menu_widget.dart index d6b1795..4767281 100644 --- a/lib/widgets/menu_widget.dart +++ b/lib/widgets/menu_widget.dart @@ -7,34 +7,36 @@ class MenuWidget extends StatelessWidget { final String text; final IconData? icon; final VoidCallback? onPressed; + final Color? borderColor; - const MenuWidget({ - super.key, - required this.text, - this.icon, - this.onPressed, - }); + const MenuWidget({super.key, required this.text, this.icon, this.onPressed, this.borderColor}); @override Widget build(BuildContext context) { return GestureDetector( onTap: onPressed, child: Container( - width: MediaQuery.of(context).size.width - 64, - height: 80, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.grey[200], - ), - child: Row(mainAxisAlignment: MainAxisAlignment.start, children: [ + width: MediaQuery.of(context).size.width - 96, + padding: EdgeInsets.only(top: 16, bottom: 16), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + border: Border.all(color: borderColor ?? const Color.fromARGB(255, 255, 255, 255), width: 2), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ const Gap(32), - Icon(icon, size: 32, color: const Color.fromRGBO(34, 51, 69, 1)), + Icon(icon, size: 24, color: const Color.fromRGBO(255, 255, 255, 1)), const Gap(64), Text( text, - style: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 20)), + style: GoogleFonts.outfit( + color: const Color.fromRGBO(255, 255, 255, 1), + textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500)), ), - ])), + ], + ), + ), ); } } diff --git a/lib/widgets/text_widget.dart b/lib/widgets/text_widget.dart index e1ecd35..28a0c48 100644 --- a/lib/widgets/text_widget.dart +++ b/lib/widgets/text_widget.dart @@ -15,7 +15,7 @@ class TextWidget extends StatelessWidget { style: GoogleFonts.outfit( textStyle: TextStyle( color: Color.fromRGBO(255, 255, 255, opacity ?? 1), - fontSize: size ?? 32, + fontSize: size ?? 28, fontWeight: bold == true ? FontWeight.bold : FontWeight.normal))); } }