From 1e9a82a714753e51f5d4d44af66d8c17e12cbfd1 Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Sun, 1 Feb 2026 23:15:24 +0100 Subject: [PATCH] Polish views --- lib/views/auth_view.dart | 16 ++++++++++++---- lib/views/content_view.dart | 9 ++++++--- lib/views/welcome_view.dart | 32 -------------------------------- pubspec.yaml | 6 ++---- 4 files changed, 20 insertions(+), 43 deletions(-) delete mode 100644 lib/views/welcome_view.dart diff --git a/lib/views/auth_view.dart b/lib/views/auth_view.dart index 92ff6c6..4ec2835 100644 --- a/lib/views/auth_view.dart +++ b/lib/views/auth_view.dart @@ -70,10 +70,18 @@ class _AuthViewState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Icon( - Icons.settings_input_antenna, - size: 80, - color: Theme.of(context).colorScheme.primary, + Center( + child: Container( + width: 100, + height: 100, + decoration: BoxDecoration( + shape: BoxShape.circle, + image: const DecorationImage( + image: AssetImage('assets/icon/app_icon.png'), + fit: BoxFit.cover, + ), + ), + ), ), const SizedBox(height: 24), Text( diff --git a/lib/views/content_view.dart b/lib/views/content_view.dart index 0958e31..05a1087 100644 --- a/lib/views/content_view.dart +++ b/lib/views/content_view.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../services/authentication_manager.dart'; -import 'welcome_view.dart'; import 'auth_view.dart'; import 'main_view.dart'; @@ -12,9 +11,13 @@ class ContentView extends StatelessWidget { Widget build(BuildContext context) { final authManager = context.watch(); - // Show splash screen while initializing + // Show loading indicator while initializing if (authManager.isInitializing) { - return const WelcomeView(); + return const Scaffold( + body: Center( + child: CircularProgressIndicator(), + ), + ); } // Show main view if authenticated, otherwise show login diff --git a/lib/views/welcome_view.dart b/lib/views/welcome_view.dart deleted file mode 100644 index de0a02f..0000000 --- a/lib/views/welcome_view.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter/material.dart'; - -class WelcomeView extends StatelessWidget { - const WelcomeView({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.settings_input_antenna, - size: 100, - color: Theme.of(context).colorScheme.primary, - ), - const SizedBox(height: 24), - Text( - 'Manage your BrandMeister devices', - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - color: Colors.grey[600], - ), - ), - const SizedBox(height: 48), - const CircularProgressIndicator(), - ], - ), - ), - ); - } -} diff --git a/pubspec.yaml b/pubspec.yaml index c94ab05..7daeacd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -83,10 +83,8 @@ flutter: # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/icon/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images