|
|
|
@ -69,21 +69,21 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
final recent = allRecipes.take(6).toList();
|
|
|
|
final recent = allRecipes.take(6).toList();
|
|
|
|
|
|
|
|
|
|
|
|
if (mounted) {
|
|
|
|
if (mounted) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
_allRecipes = allRecipes;
|
|
|
|
_allRecipes = allRecipes;
|
|
|
|
_favoriteRecipes = favorites;
|
|
|
|
_favoriteRecipes = favorites;
|
|
|
|
_recentRecipes = recent;
|
|
|
|
_recentRecipes = recent;
|
|
|
|
_tagCounts = Map.fromEntries(sortedTags);
|
|
|
|
_tagCounts = Map.fromEntries(sortedTags);
|
|
|
|
_isLoading = false;
|
|
|
|
_isLoading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
Logger.error('Failed to load home data', e);
|
|
|
|
Logger.error('Failed to load home data', e);
|
|
|
|
if (mounted) {
|
|
|
|
if (mounted) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
_isLoading = false;
|
|
|
|
_isLoading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -420,7 +420,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
if (recipe.isFavourite) ...[
|
|
|
|
if (recipe.isFavourite) ...[
|
|
|
|
if (recipe.rating > 0) const SizedBox(width: 8),
|
|
|
|
if (recipe.rating > 0) const SizedBox(width: 8),
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
Icons.favorite,
|
|
|
|
Icons.favorite,
|
|
|
|
size: 16,
|
|
|
|
size: 16,
|
|
|
|
color: Colors.red,
|
|
|
|
color: Colors.red,
|
|
|
|
@ -443,8 +443,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
child: Icon(
|
|
|
|
child: Icon(
|
|
|
|
Icons.restaurant_menu,
|
|
|
|
Icons.restaurant_menu,
|
|
|
|
size: 48,
|
|
|
|
size: 48,
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -583,14 +583,14 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
Icons.favorite,
|
|
|
|
Icons.favorite,
|
|
|
|
color: Colors.red,
|
|
|
|
color: Colors.red,
|
|
|
|
size: 20,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -680,7 +680,7 @@ class _VideoThumbnailPreviewState extends State<_VideoThumbnailPreview> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return Stack(
|
|
|
|
return Stack(
|
|
|
|
|