From ab3245ffe500918cad58f772df49c324f23ead68 Mon Sep 17 00:00:00 2001 From: Benjamin Canape Date: Tue, 6 Feb 2024 21:03:26 +0100 Subject: [PATCH] fix main loader and back button hero tag --- lib/main.dart | 2 +- lib/presentation/common/core/utils/ui_utils.dart | 1 + lib/presentation/settings/screens/edit_profile_screen.dart | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 23aabfa2..55a55aa5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -115,7 +115,7 @@ class MyApp extends HookConsumerWidget { future: provider.getJwt(), builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return UIUtils.loader; + return buildMaterialApp(Center(child: UIUtils.loader)); } else if (snapshot.hasData && snapshot.data != null) { return buildMaterialApp(const HomeScreen()); } else { diff --git a/lib/presentation/common/core/utils/ui_utils.dart b/lib/presentation/common/core/utils/ui_utils.dart index cf76cc8a..59a7a7ac 100644 --- a/lib/presentation/common/core/utils/ui_utils.dart +++ b/lib/presentation/common/core/utils/ui_utils.dart @@ -31,6 +31,7 @@ class UIUtils { /// A function that create the back button static FloatingActionButton createBackButton(BuildContext context) { return FloatingActionButton( + heroTag: 'back_button', backgroundColor: ColorUtils.main, elevation: 4.0, child: Icon( diff --git a/lib/presentation/settings/screens/edit_profile_screen.dart b/lib/presentation/settings/screens/edit_profile_screen.dart index 4921070c..df138f03 100644 --- a/lib/presentation/settings/screens/edit_profile_screen.dart +++ b/lib/presentation/settings/screens/edit_profile_screen.dart @@ -144,6 +144,7 @@ class EditProfileScreen extends HookConsumerWidget { bottom: 16, right: 80, child: FloatingActionButton( + heroTag: 'save_button', backgroundColor: ColorUtils.main, elevation: 4.0, child: Icon(