diff --git a/lib/view/home/no_activity_view.dart b/lib/view/home/no_activity_view.dart index dfbc4da..206cda6 100644 --- a/lib/view/home/no_activity_view.dart +++ b/lib/view/home/no_activity_view.dart @@ -14,52 +14,51 @@ class NoActivityView extends StatefulWidget { } class _NoActivityViewState extends State { - @override Widget build(BuildContext context) { var media = MediaQuery.of(context).size; return Scaffold( backgroundColor: TColor.white, body: SafeArea( - child: Container( - width: media.width, - padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - children: [ - SizedBox( - height: media.width * 0.05, - ), - SvgPicture.asset( - "assets/img/group.svg", - width: media.width * 0.75, - height: media.height * 0.4, - fit: BoxFit.fitWidth, - ), - SizedBox( - height: media.width * 0.05 , - ), - Text( - "Pas d'activité selectionnée", - style: TextStyle( + child: Center( // Utilisation du widget Center pour centrer verticalement + child: Container( + width: media.width, + padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.min, // Utilisation de MainAxisSize.min pour que la colonne prenne la hauteur minimale nécessaire + children: [ + SizedBox( + height: media.height * 0.1, + ), + SvgPicture.asset( + "assets/img/group.svg", + width: media.width * 0.75, + height: media.height * 0.4, + fit: BoxFit.fitWidth, + ), + SizedBox( + height: media.height * 0.1, + ), + Text( + "Pas d'activité sélectionnée", + style: TextStyle( color: TColor.black, fontSize: 20, - fontWeight: FontWeight.w700), - ), - Text( - "Veuillez selectionner une activité en cliquant sur la loupe ci-dessous", - textAlign: TextAlign.center, - style: TextStyle(color: TColor.gray, fontSize: 12), - ), - const Spacer(), - - - ], + fontWeight: FontWeight.w700, + ), + ), + Text( + "Veuillez sélectionner une activité en cliquant sur la loupe ci-dessous", + textAlign: TextAlign.center, + style: TextStyle(color: TColor.gray, fontSize: 12), + ), + Spacer(), + ], + ), ), ), - ), ); } -} \ No newline at end of file +} diff --git a/lib/view/main_tab/main_tab_view.dart b/lib/view/main_tab/main_tab_view.dart index 28641a4..44b7b75 100644 --- a/lib/view/main_tab/main_tab_view.dart +++ b/lib/view/main_tab/main_tab_view.dart @@ -17,7 +17,7 @@ class MainTabView extends StatefulWidget { class _MainTabViewState extends State { int selectTab = 0; final PageStorageBucket pageBucket = PageStorageBucket(); - Widget currentTab = const HomeView(); + Widget currentTab = const ListActivity(); @override Widget build(BuildContext context) { return Scaffold(