Enable Material 3 on add_to_app/flutter_module_using_plugin (#1593)

pull/1612/head
Miguel Beltran 1 year ago committed by GitHub
parent cb8aa1f725
commit a15a98252d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,6 +76,10 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Module Title',
theme: ThemeData(
colorSchemeSeed: Colors.blue,
useMaterial3: true,
),
routes: {
'/': (context) => const FullScreenView(),
'/mini': (context) => const Contents(),
@ -155,13 +159,13 @@ class Contents extends StatelessWidget {
const SizedBox(height: 16),
Consumer<CounterModel>(
builder: (context, model, child) {
return ElevatedButton(
return FilledButton(
onPressed: () => model.increment(),
child: const Text('Tap me!'),
);
},
),
ElevatedButton(
FilledButton(
onPressed: () async {
// Use the url_launcher plugin to open the Flutter docs in
// a browser.
@ -174,7 +178,7 @@ class Contents extends StatelessWidget {
),
if (showExit) ...[
const SizedBox(height: 16),
ElevatedButton(
FilledButton(
onPressed: () => SystemNavigator.pop(),
child: const Text('Exit this screen'),
),

Loading…
Cancel
Save