Refactor code structure for improved readability and maintainability
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -87,8 +87,8 @@ class _MealPlanScreenState extends ConsumerState<MealPlanScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
final recipes = recipesAsync.valueOrNull ?? const <Recipe>[];
|
||||
final dashboard = dashboardAsync.valueOrNull ??
|
||||
final recipes = recipesAsync.maybeWhen(data: (d) => d, orElse: () => null) ?? const <Recipe>[];
|
||||
final dashboard = dashboardAsync.maybeWhen(data: (d) => d, orElse: () => null) ??
|
||||
const MealPlanDashboard(
|
||||
entries: [],
|
||||
shoppingItems: [],
|
||||
|
||||
Reference in New Issue
Block a user