1
0
Fork 0
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.
 
 
 
 
 
thesis_shop/lib/screens/cart/total_price_text.dart

24 lines
729 B

import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:thesis_shop/redux/state.dart';
class TotalPriceText extends StatelessWidget {
const TotalPriceText({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return StoreConnector<AppState, String>(
converter: (store) => store.state.totalPrice.toStringAsFixed(2),
builder: (context, price) => SafeArea(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Gesamtpreis: $price',
style:
Theme.of(context).textTheme.labelLarge?.copyWith(fontSize: 24),
),
),
),
);
}
}