diff --git a/lib/widgets/gallery/overview.dart b/lib/widgets/gallery/overview.dart index e222ae0b8..a0011c2e5 100644 --- a/lib/widgets/gallery/overview.dart +++ b/lib/widgets/gallery/overview.dart @@ -39,7 +39,7 @@ class Gallery extends StatelessWidget { padding: const EdgeInsets.all(5), child: RefreshIndicator( onRefresh: () => provider.fetchAndSetGallery(), - child: provider.images.length == 0 + child: provider.images.isEmpty ? TextPrompt() : MasonryGridView.count( crossAxisCount: 2, diff --git a/lib/widgets/nutrition/nutritional_plans_list.dart b/lib/widgets/nutrition/nutritional_plans_list.dart index c2678c206..6d1eae27d 100644 --- a/lib/widgets/nutrition/nutritional_plans_list.dart +++ b/lib/widgets/nutrition/nutritional_plans_list.dart @@ -32,7 +32,7 @@ class NutritionalPlansList extends StatelessWidget { Widget build(BuildContext context) { return RefreshIndicator( onRefresh: () => _nutritionProvider.fetchAndSetAllPlansSparse(), - child: _nutritionProvider.items.length == 0 + child: _nutritionProvider.items.isEmpty ? TextPrompt() : ListView.builder( padding: const EdgeInsets.all(10.0), diff --git a/lib/widgets/workouts/workout_plans_list.dart b/lib/widgets/workouts/workout_plans_list.dart index 875bf5d7f..92723dd40 100644 --- a/lib/widgets/workouts/workout_plans_list.dart +++ b/lib/widgets/workouts/workout_plans_list.dart @@ -33,7 +33,7 @@ class WorkoutPlansList extends StatelessWidget { Widget build(BuildContext context) { return RefreshIndicator( onRefresh: () => _workoutProvider.fetchAndSetAllPlansSparse(), - child: _workoutProvider.items.length == 0 + child: _workoutProvider.items.isEmpty ? TextPrompt() : ListView.builder( padding: const EdgeInsets.all(10.0),