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.
24 lines
729 B
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),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|