Skip to content

Commit

Permalink
chore(flutter_shopping_cart): update styles for material 3 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Nov 24, 2023
1 parent c12c3e5 commit cce8d38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/flutter_shopping_cart/lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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'),
),
],
Expand Down

0 comments on commit cce8d38

Please sign in to comment.