diff options
Diffstat (limited to 'lib/views/favorites_view.dart')
-rw-r--r-- | lib/views/favorites_view.dart | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/views/favorites_view.dart b/lib/views/favorites_view.dart index 97f784c..d133b79 100644 --- a/lib/views/favorites_view.dart +++ b/lib/views/favorites_view.dart @@ -25,7 +25,7 @@ class FavoritesViewState extends State<FavoritesView> { return Scaffold( appBar: _buildAppBar(context), drawer: const CustomDrawer(initialIndex: 1), - body: Container( + body: SizedBox( width: double.infinity, child: Builder( builder: (BuildContext context) { @@ -66,14 +66,14 @@ class FavoritesViewState extends State<FavoritesView> { } Widget _buildListView() { - List<Recipe> _filteredRecipeList = RecipeData.recipeList.where((element) => element.favorite).toList(); + List<Recipe> filteredRecipeList = RecipeData.recipeList.where((element) => element.favorite).toList(); - if (_filteredRecipeList.isEmpty) return const NoContentError(); + if (filteredRecipeList.isEmpty) return const NoContentError(); return ListView.builder( - itemCount: _filteredRecipeList.length, + itemCount: filteredRecipeList.length, itemBuilder: (context, index) => RecipeCard( - recipe: _filteredRecipeList[index], + recipe: filteredRecipeList[index], redrawCallback: redrawFavoritesView, showToastCallback: showToastCallback, ), |