feat:更新组件UI
This commit is contained in:
@@ -14,7 +14,8 @@ class RecipeCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final String firstImageUrl = recipe.recordList.first.imageUrl;
|
||||
final List<String> imageUrls =
|
||||
recipe.recordList.reversed.map((record) => record.imageUrl).toList();
|
||||
|
||||
Widget buildRecipeContent(BuildContext context) {
|
||||
return Column(
|
||||
@@ -33,6 +34,7 @@ class RecipeCard extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@@ -84,7 +86,7 @@ class RecipeCard extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildNetworkImage(context, firstImageUrl),
|
||||
buildNetworkImage(context, imageUrls, 0),
|
||||
SizedBox(height: 8),
|
||||
GestureDetector(
|
||||
onTap: () => navigatorToRecipeDetail(context),
|
||||
|
||||
Reference in New Issue
Block a user