feat:重构UI模块
This commit is contained in:
@@ -72,14 +72,12 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('菜谱信息', style: TextStyle(color: Colors.white)),
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
title: Text('菜谱信息'),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: Colors.white),
|
||||
icon: Icon(Icons.arrow_back),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFF5F5F5),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(padding: EdgeInsets.all(5), child: _buildRecipeDetail()),
|
||||
),
|
||||
@@ -224,8 +222,9 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
required String title,
|
||||
required Widget content,
|
||||
}) {
|
||||
return cardContainer(
|
||||
Column(
|
||||
return buildCard(
|
||||
context: context,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
@@ -241,7 +240,7 @@ class _RecipeDetailState extends State<RecipeDetailPage> {
|
||||
SizedBox(height: 5),
|
||||
content,
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user