feat:更新记录页面模块
This commit is contained in:
22
lib/widgets/recipe/recipe_list.dart
Normal file
22
lib/widgets/recipe/recipe_list.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:food_hub_app/models/recipe.dart';
|
||||
import 'package:food_hub_app/widgets/recipe/recipe_card.dart';
|
||||
|
||||
class RecipeList extends StatelessWidget {
|
||||
final List<Recipe> recipeList;
|
||||
|
||||
const RecipeList({super.key, required this.recipeList});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.separated(
|
||||
itemCount: recipeList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return RecipeCard(recipe: recipeList[index]);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const SizedBox(height: 10);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user