From cce8d38c8c77bf3ae743f8b0e19bf15892a7b7f3 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Fri, 24 Nov 2023 00:09:18 -0600 Subject: [PATCH] chore(flutter_shopping_cart): update styles for material 3 compat --- examples/flutter_shopping_cart/lib/app.dart | 7 +++++++ .../flutter_shopping_cart/lib/cart/view/cart_page.dart | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/flutter_shopping_cart/lib/app.dart b/examples/flutter_shopping_cart/lib/app.dart index eb629d4ada7..eac3783dd2d 100644 --- a/examples/flutter_shopping_cart/lib/app.dart +++ b/examples/flutter_shopping_cart/lib/app.dart @@ -26,6 +26,13 @@ class App extends StatelessWidget { ], child: MaterialApp( title: 'Flutter Bloc Shopping Cart', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.white), + appBarTheme: const AppBarTheme( + backgroundColor: Colors.transparent, + elevation: 0, + ), + ), initialRoute: '/', routes: { '/': (_) => const CatalogPage(), diff --git a/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart b/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart index 035a1981c53..26f3cad4448 100644 --- a/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart +++ b/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart @@ -8,6 +8,7 @@ class CartPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( + extendBodyBehindAppBar: true, appBar: AppBar(title: const Text('Cart')), body: const ColoredBox( color: Colors.yellow, @@ -97,7 +98,6 @@ class CartTotal extends StatelessWidget { const SnackBar(content: Text('Buying not supported yet.')), ); }, - style: ElevatedButton.styleFrom(backgroundColor: Colors.black), child: const Text('BUY'), ), ],