Skip to content

Commit 9690ef5

Browse files
Update Gallery demo app themes for Material3 compatibility (#131093)
1 parent d7ed5dc commit 9690ef5

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const double _kRecipePageMaxWidth = 500.0;
2323
final Set<Recipe?> _favoriteRecipes = <Recipe?>{};
2424

2525
final ThemeData _kTheme = ThemeData(
26+
appBarTheme: const AppBarTheme(foregroundColor: Colors.white, backgroundColor: Colors.teal),
2627
brightness: Brightness.light,
27-
primarySwatch: Colors.teal,
28+
floatingActionButtonTheme: const FloatingActionButtonThemeData(foregroundColor: Colors.white),
2829
);
2930

3031
class PestoHome extends StatelessWidget {

dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ ThemeData _buildShrineTheme() {
9292
textTheme: _buildShrineTextTheme(base.textTheme),
9393
primaryTextTheme: _buildShrineTextTheme(base.primaryTextTheme),
9494
iconTheme: _customIconTheme(base.iconTheme),
95+
appBarTheme: const AppBarTheme(backgroundColor: kShrinePink100),
9596
);
9697
}
9798

dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class _LoginPageState extends State<LoginPage> {
9999
// of Shrine completely.
100100
Navigator.of(context, rootNavigator: true).pop();
101101
},
102-
child: const Text('CANCEL'),
102+
child: Text('CANCEL', style: Theme.of(context).textTheme.bodySmall),
103103
),
104104
ElevatedButton(
105105
style: ElevatedButton.styleFrom(
@@ -111,7 +111,7 @@ class _LoginPageState extends State<LoginPage> {
111111
onPressed: () {
112112
Navigator.pop(context);
113113
},
114-
child: const Text('NEXT'),
114+
child: Text('NEXT', style: Theme.of(context).textTheme.bodySmall),
115115
),
116116
],
117117
),

0 commit comments

Comments
 (0)