import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:thesis_shop/store/cart_store.dart'; class TotalPriceText extends StatelessWidget { const TotalPriceText({Key? key}) : super(key: key); @override Widget build(BuildContext context) { final totalPrice = context .select((store) => store.totalPrice) .toStringAsFixed(2); return SafeArea( child: Padding( padding: const EdgeInsets.all(8.0), child: Text( 'Gesamtpreis: $totalPriceā‚¬', style: Theme.of(context).textTheme.labelLarge?.copyWith(fontSize: 24), ), ), ); } }