mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Enable Material 3 on add_to_app/flutter_module_using_plugin (#1593)
This commit is contained in:
@@ -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'),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user