mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
isEmpty instead of ==0
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user