diff --git a/lib/components/dashboard/latest_loco_changes_panel.dart b/lib/components/dashboard/latest_loco_changes_panel.dart index 986755f..ddf2e34 100644 --- a/lib/components/dashboard/latest_loco_changes_panel.dart +++ b/lib/components/dashboard/latest_loco_changes_panel.dart @@ -51,7 +51,7 @@ class _LatestLocoChangesPanelState extends State { const SizedBox(width: 8), Expanded( child: Text( - 'Latest loco changes', + 'Latest Loco Changes', style: textTheme.titleMedium?.copyWith( fontWeight: FontWeight.w800, ), diff --git a/lib/components/login/login.dart b/lib/components/login/login.dart index 3bf3e97..511ea46 100644 --- a/lib/components/login/login.dart +++ b/lib/components/login/login.dart @@ -17,7 +17,9 @@ class _LoginScreenState extends State { @override void initState() { super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) => _checkExistingSession()); + WidgetsBinding.instance.addPostFrameCallback( + (_) => _checkExistingSession(), + ); } Future _checkExistingSession() async { @@ -71,15 +73,6 @@ class _LoginScreenState extends State { ), ), ), - if (_checkingSession) - const Padding( - padding: EdgeInsets.only(top: 12), - child: SizedBox( - height: 24, - width: 24, - child: CircularProgressIndicator(strokeWidth: 2), - ), - ), const SizedBox(height: 50), const LoginPanel(), const SizedBox(height: 16), @@ -95,6 +88,24 @@ class _LoginScreenState extends State { ); }, ), + if (_checkingSession) ...[ + const SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox( + height: 24, + width: 24, + child: CircularProgressIndicator(strokeWidth: 2), + ), + const SizedBox(width: 8), + Text( + 'Trying to log in', + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + ], ], ), ), @@ -193,9 +204,9 @@ class _LoginPanelContentState extends State { setState(() { _loggingIn = false; }); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Login failed: $e')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Login failed: $e'))); } } @@ -306,14 +317,16 @@ class _RegisterPanelContentState extends State { ); if (!mounted) return; ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Registration successful. Please log in.')), + const SnackBar( + content: Text('Registration successful. Please log in.'), + ), ); widget.onBack(); } catch (e) { if (!mounted) return; - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Registration failed: $e')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Registration failed: $e'))); } finally { if (mounted) setState(() => _registering = false); } diff --git a/pubspec.yaml b/pubspec.yaml index 6dff7b9..83c97c1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.4.2+1 +version: 0.4.3+1 environment: sdk: ^3.8.1