feat:更新Card样式

This commit is contained in:
2025-11-19 22:48:25 +08:00
parent 5151430132
commit e6ee934a3e
5 changed files with 32 additions and 33 deletions

View File

@@ -18,6 +18,7 @@ class _RecipeCalendarState extends State<RecipeCalendar> {
return TableCalendar(
locale: 'zh_CN',
headerStyle: const HeaderStyle(
headerPadding: EdgeInsets.symmetric(vertical: 0),
formatButtonVisible: false,
titleCentered: true,
),

View File

@@ -36,39 +36,34 @@ class _RecipeListState extends State<RecipeList> {
padding: EdgeInsets.symmetric(horizontal: 16),
child: DropdownButton<String>(
value: provider.queryCategory,
hint: Text(
'请选择菜谱类别',
style: TextStyle(color: Colors.grey[500]),
),
hint: Text('请选择菜谱类别', style: TextStyle(color: Colors.grey[500])),
isExpanded: true,
borderRadius: BorderRadius.circular(12),
dropdownColor: Colors.white,
elevation: 6,
underline: Container(),
items: provider.categoryList.map((String value) {
return DropdownMenuItem<String>(
value: value,
child: Row(
children: [
Container(
width: 8,
height: 8,
decoration: BoxDecoration(
color: colors.primary,
shape: BoxShape.circle,
),
items:
provider.categoryList.map((String value) {
return DropdownMenuItem<String>(
value: value,
child: Row(
children: [
Container(
width: 8,
height: 8,
decoration: BoxDecoration(
color: colors.primary,
shape: BoxShape.circle,
),
),
SizedBox(width: 8),
Expanded(
child: Text(value, style: TextStyle(fontSize: 14)),
),
],
),
SizedBox(width: 8),
Expanded(
child: Text(
value,
style: TextStyle(fontSize: 14),
),
)
],
),
);
}).toList(),
);
}).toList(),
onChanged: (value) {
setState(() {
provider.queryCategory = value!;
@@ -86,6 +81,7 @@ class _RecipeListState extends State<RecipeList> {
return Column(
children: [
_buildSelectCategory(provider),
SizedBox(height: 5),
Expanded(
child: ListView.builder(
itemCount: provider.recipeSummaryList.length,