You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
536 B
18 lines
536 B
import 'package:flutter/material.dart';
|
|
import 'package:thesis_shop/models/product.dart';
|
|
|
|
import 'product_item.dart';
|
|
|
|
class ProductList extends StatelessWidget {
|
|
final List<Product> products;
|
|
const ProductList({Key? key, required this.products}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListView.separated(
|
|
itemCount: products.length,
|
|
itemBuilder: (context, index) => ProductItem(product: products[index]),
|
|
separatorBuilder: (context, _) => const Divider(),
|
|
);
|
|
}
|
|
}
|
|
|