aboutsummaryrefslogtreecommitdiff
path: root/lib/views/favorites_view.dart
diff options
context:
space:
mode:
authordavidpkj <davidpenkow1@gmail.com>2023-03-11 17:54:46 +0100
committerdavidpkj <davidpenkow1@gmail.com>2023-03-11 17:54:46 +0100
commit0570147b3104eb329207ff374541d9d6797fe427 (patch)
tree41da77cffc72c8a8e9329c9dde0bff3a4c7f9ecc /lib/views/favorites_view.dart
parentc9acbf458ff90d37be76fa32aeb1a2591d87144f (diff)
Updated code to dart analysis recommendations
Diffstat (limited to 'lib/views/favorites_view.dart')
-rw-r--r--lib/views/favorites_view.dart10
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,
),