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.
31 lines
844 B
31 lines
844 B
import 'package:flutter/material.dart';
|
|
import 'package:thesis_shop/models/product.dart';
|
|
import 'package:thesis_shop/widgets/user_switch.dart';
|
|
|
|
import 'cart_button_overlay.dart';
|
|
import 'product_list.dart';
|
|
|
|
const _productPlaceholder = [
|
|
Product(title: 'Bananen', price: 3),
|
|
Product(title: 'Äpfel', price: 2),
|
|
Product(title: 'Birnen', price: 2.5),
|
|
Product(title: 'Kirschen', price: 1.2),
|
|
];
|
|
|
|
class ProductListScreen extends StatelessWidget {
|
|
const ProductListScreen({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
const products = _productPlaceholder;
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Thesis Shop'),
|
|
actions: const [UserSwitch()],
|
|
),
|
|
body: const CartButtonOverlay(
|
|
child: ProductList(products: products),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|