factor:布局颜色重构
This commit is contained in:
@@ -55,9 +55,8 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('菜谱信息')),
|
||||
backgroundColor: Color(0xFFF5F5F5),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(padding: EdgeInsets.all(5), child: _buildRecipeDetail()),
|
||||
child: Padding(padding: EdgeInsets.all(10), child: _buildRecipeDetail()),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -67,12 +66,14 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
_buildTitleSection(),
|
||||
SizedBox(height: 8),
|
||||
_buildInfoCard(
|
||||
context,
|
||||
icon: Icons.info,
|
||||
title: "基础信息",
|
||||
content: buildTag(context, recipe.category),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
_buildInfoCard(
|
||||
context,
|
||||
icon: Icons.shopping_cart,
|
||||
@@ -86,6 +87,7 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
_buildInfoCard(
|
||||
context,
|
||||
icon: Icons.list,
|
||||
@@ -95,6 +97,7 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
recipe.stepList.map((step) => _buildStepSection(step)).toList(),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
_buildInfoCard(
|
||||
context,
|
||||
icon: Icons.note,
|
||||
@@ -183,8 +186,7 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
required String title,
|
||||
required Widget content,
|
||||
}) {
|
||||
return buildCard(
|
||||
context: context,
|
||||
return BuildCard(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user