feat:更新美食记录表单

This commit is contained in:
2025-11-23 00:02:41 +08:00
parent 1ac504f3d7
commit 6308169013
41 changed files with 465 additions and 1618 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_common/widget/common_widget.dart';
import 'package:food_hub_app/models/recipe.dart';
import 'package:food_hub_app/provider/food_provider.dart';
import 'package:food_hub_app/utils/index.dart';
@@ -37,7 +38,7 @@ class _RecipeCalendarState extends State<RecipeCalendar> {
},
onPageChanged: (focusedDay) {
provider.focusedDay = focusedDay;
provider.refreshRecordList(null, null);
provider.refreshRecordList();
},
// 自定义日期单元格构建器
calendarBuilders: CalendarBuilders(
@@ -191,9 +192,9 @@ class _RecipeCalendarState extends State<RecipeCalendar> {
Widget _buildContent(FoodProvider provider) {
return Column(
children: [
BuildCard(child: _recipeCalendar(provider)),
CommonCard(child: _recipeCalendar(provider)),
SizedBox(height: 8),
Expanded(child: BuildCard(child: _dailyItem(context, provider))),
Expanded(child: CommonCard(child: _dailyItem(context, provider))),
],
);
}
@@ -205,7 +206,7 @@ class _RecipeCalendarState extends State<RecipeCalendar> {
return Stack(
children: [
if (provider.isLoading)
buildLoadingIndicator(context)
buildLoadingIndicator()
else
_buildContent(provider),
],