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.
34 lines
1020 B
34 lines
1020 B
import 'package:flutter/material.dart';
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
import 'package:thesis_shop/models/cart_item.dart';
|
|
import 'package:thesis_shop/redux/state.dart';
|
|
import 'package:thesis_shop/screens/cart/total_price_text.dart';
|
|
import 'package:thesis_shop/widgets/user_switch.dart';
|
|
|
|
import 'cart_item_list.dart';
|
|
|
|
class CartScreen extends StatelessWidget {
|
|
const CartScreen({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Warenkorb'),
|
|
actions: [UserSwitch(isOn: true, onChanged: (_) {})],
|
|
),
|
|
body: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Expanded(
|
|
child: StoreConnector<AppState, List<CartItem>>(
|
|
converter: (store) => store.state.cart,
|
|
builder: (context, cart) => CartItemList(items: cart),
|
|
),
|
|
),
|
|
const TotalPriceText(),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|