1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Migrate to the New Material Buttons (#668)

This commit is contained in:
Brett Morgan
2021-01-27 13:20:50 +11:00
committed by GitHub
parent 6502209a78
commit 622e8d55d3
44 changed files with 122 additions and 107 deletions

View File

@@ -138,7 +138,7 @@ class Contents extends StatelessWidget {
SizedBox(height: 16),
Consumer<CounterModel>(
builder: (context, model, child) {
return RaisedButton(
return ElevatedButton(
onPressed: () => model.increment(),
child: Text('Tap me!'),
);
@@ -146,7 +146,7 @@ class Contents extends StatelessWidget {
),
if (showExit) ...[
SizedBox(height: 16),
RaisedButton(
ElevatedButton(
onPressed: () => SystemNavigator.pop(animated: true),
child: Text('Exit this screen'),
),

View File

@@ -140,13 +140,13 @@ class Contents extends StatelessWidget {
SizedBox(height: 16),
Consumer<CounterModel>(
builder: (context, model, child) {
return RaisedButton(
return ElevatedButton(
onPressed: () => model.increment(),
child: Text('Tap me!'),
);
},
),
RaisedButton(
ElevatedButton(
onPressed: () async {
// Use the url_launcher plugin to open the Flutter docs in
// a browser.
@@ -159,7 +159,7 @@ class Contents extends StatelessWidget {
),
if (showExit) ...[
SizedBox(height: 16),
RaisedButton(
ElevatedButton(
onPressed: () => SystemNavigator.pop(),
child: Text('Exit this screen'),
),