23 lines
619 B
Dart
23 lines
619 B
Dart
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);
|
|
},
|
|
);
|
|
}
|
|
}
|