From 9fca329503210937fcbc50f38750173e092803c2 Mon Sep 17 00:00:00 2001 From: Zikani Nyirenda Mwase Date: Mon, 27 Nov 2023 15:13:33 +0200 Subject: [PATCH] chore: fix flutter analyze issues --- app/lib/main.dart | 4 ++-- app/lib/presentation/screens/favourites.dart | 4 ++-- app/lib/presentation/screens/home.dart | 8 ++++---- app/lib/presentation/screens/splash_screen.dart | 6 +++--- app/lib/presentation/widgets/nav_bar.dart | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/lib/main.dart b/app/lib/main.dart index 755e817..4ac00fe 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -14,8 +14,8 @@ Future main() async { theme: ThemeData( useMaterial3: true, fontFamily: GoogleFonts.lato().fontFamily, - appBarTheme: AppBarTheme( - backgroundColor: const Color.fromARGB(255, 15, 91, 254), + appBarTheme: const AppBarTheme( + backgroundColor: Color.fromARGB(255, 15, 91, 254), ), ), ), diff --git a/app/lib/presentation/screens/favourites.dart b/app/lib/presentation/screens/favourites.dart index b8196ed..a80c0c1 100644 --- a/app/lib/presentation/screens/favourites.dart +++ b/app/lib/presentation/screens/favourites.dart @@ -243,9 +243,9 @@ class Favourite extends StatelessWidget { return SizedBox( height: size.height, width: size.width, - child: Center( + child: const Center( child: CircularProgressIndicator( - color: const Color.fromARGB(255, 15, 91, 254), + color: Color.fromARGB(255, 15, 91, 254), ), ), ); diff --git a/app/lib/presentation/screens/home.dart b/app/lib/presentation/screens/home.dart index 0e9db89..699ad44 100644 --- a/app/lib/presentation/screens/home.dart +++ b/app/lib/presentation/screens/home.dart @@ -20,9 +20,9 @@ class Home extends StatelessWidget { style: titleStyles, ), centerTitle: true, - leading: Icon( + leading: const Icon( Icons.ac_unit, - color: const Color.fromARGB(255, 15, 91, 254), + color: Color.fromARGB(255, 15, 91, 254), ), bottom: PreferredSize( preferredSize: const Size.fromHeight(50.0), @@ -237,9 +237,9 @@ class Home extends StatelessWidget { return SizedBox( height: size.height, width: size.width, - child: Center( + child: const Center( child: CircularProgressIndicator( - color: const Color.fromARGB(255, 15, 91, 254), + color: Color.fromARGB(255, 15, 91, 254), ), ), ); diff --git a/app/lib/presentation/screens/splash_screen.dart b/app/lib/presentation/screens/splash_screen.dart index de055b3..2745d95 100644 --- a/app/lib/presentation/screens/splash_screen.dart +++ b/app/lib/presentation/screens/splash_screen.dart @@ -38,11 +38,11 @@ class _SplashscreenState extends State { ), // ignore: prefer_const_constructors Center( - child: Column( + child: const Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - const Text( + Text( "Bankimoon", style: TextStyle( fontWeight: FontWeight.bold, @@ -50,7 +50,7 @@ class _SplashscreenState extends State { color: Colors.white, ), ), - const SizedBox( + SizedBox( height: 10, ), SpinKitWave( diff --git a/app/lib/presentation/widgets/nav_bar.dart b/app/lib/presentation/widgets/nav_bar.dart index ad0ec36..cdc17b2 100644 --- a/app/lib/presentation/widgets/nav_bar.dart +++ b/app/lib/presentation/widgets/nav_bar.dart @@ -53,7 +53,7 @@ class BottomNavBar extends StatelessWidget { }, ), // ignore: prefer_const_constructors - Text( + const Text( 'Favorites', style: TextStyle(color: Colors.white), ), @@ -63,7 +63,7 @@ class BottomNavBar extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ IconButton( - icon: Icon( + icon: const Icon( Icons.add, color: Colors.white, // Set the icon color to white ), @@ -71,7 +71,7 @@ class BottomNavBar extends StatelessWidget { Navigator.pushNamed(context, addAccount); }, ), - Text( + const Text( 'Add Account', style: TextStyle(color: Colors.white), ), @@ -81,13 +81,13 @@ class BottomNavBar extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ IconButton( - icon: Icon( + icon: const Icon( Icons.account_circle, color: Colors.white, // Set the icon color to white ), onPressed: () {}, ), - Text( + const Text( 'My Accounts', style: TextStyle(color: Colors.white), ),