Unverified Commit d1698802 authored by Darren Austin's avatar Darren Austin Committed by GitHub

Updated references to the old button classes to the new ones in comments and...

Updated references to the old button classes to the new ones in comments and documentation for tests in the material and cupertino libraries. (#62164)
parent 1ffdfa81
...@@ -1170,7 +1170,7 @@ Widget createAppWithButtonThatLaunchesDialog({ WidgetBuilder dialogBuilder }) { ...@@ -1170,7 +1170,7 @@ Widget createAppWithButtonThatLaunchesDialog({ WidgetBuilder dialogBuilder }) {
home: Material( home: Material(
child: Center( child: Center(
child: Builder(builder: (BuildContext context) { child: Builder(builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
context: context, context: context,
...@@ -1196,7 +1196,7 @@ Widget createAppWithCenteredButton(Widget child) { ...@@ -1196,7 +1196,7 @@ Widget createAppWithCenteredButton(Widget child) {
return MaterialApp( return MaterialApp(
home: Material( home: Material(
child: Center( child: Center(
child: RaisedButton( child: ElevatedButton(
onPressed: null, onPressed: null,
child: child child: child
), ),
......
...@@ -1729,7 +1729,7 @@ void main() { ...@@ -1729,7 +1729,7 @@ void main() {
floating: true, floating: true,
snap: snap, snap: snap,
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('snap=false'), child: const Text('snap=false'),
onPressed: () { onPressed: () {
setState(() { setState(() {
......
...@@ -98,7 +98,7 @@ void main() { ...@@ -98,7 +98,7 @@ void main() {
home: Builder( home: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Material( return Material(
child: RaisedButton( child: ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { Navigator.of(context).pushNamed('/next'); }, onPressed: () { Navigator.of(context).pushNamed('/next'); },
), ),
...@@ -255,7 +255,7 @@ void main() { ...@@ -255,7 +255,7 @@ void main() {
home: Builder( home: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Material( return Material(
child: RaisedButton( child: ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () async { onPressed: () async {
result = Navigator.of(context).pushNamed('/a'); result = Navigator.of(context).pushNamed('/a');
...@@ -267,7 +267,7 @@ void main() { ...@@ -267,7 +267,7 @@ void main() {
routes: <String, WidgetBuilder>{ routes: <String, WidgetBuilder>{
'/a': (BuildContext context) { '/a': (BuildContext context) {
return Material( return Material(
child: RaisedButton( child: ElevatedButton(
child: const Text('Y'), child: const Text('Y'),
onPressed: () { onPressed: () {
Navigator.of(context).pop('all done'); Navigator.of(context).pop('all done');
......
...@@ -17,7 +17,7 @@ void main() { ...@@ -17,7 +17,7 @@ void main() {
backgroundColor: color, backgroundColor: color,
content: const Text('I am a banner'), content: const Text('I am a banner'),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -39,7 +39,7 @@ void main() { ...@@ -39,7 +39,7 @@ void main() {
contentTextStyle: contentTextStyle, contentTextStyle: contentTextStyle,
content: const Text(contentText), content: const Text(contentText),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -60,11 +60,11 @@ void main() { ...@@ -60,11 +60,11 @@ void main() {
home: MaterialBanner( home: MaterialBanner(
content: const Text(contentText), content: const Text(contentText),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action 1'), child: const Text('Action 1'),
onPressed: () { }, onPressed: () { },
), ),
FlatButton( TextButton(
child: const Text('Action 2'), child: const Text('Action 2'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -87,7 +87,7 @@ void main() { ...@@ -87,7 +87,7 @@ void main() {
home: MaterialBanner( home: MaterialBanner(
content: const Text(contentText), content: const Text(contentText),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -109,7 +109,7 @@ void main() { ...@@ -109,7 +109,7 @@ void main() {
home: MaterialBanner( home: MaterialBanner(
content: const Text('Content'), content: const Text('Content'),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -132,7 +132,7 @@ void main() { ...@@ -132,7 +132,7 @@ void main() {
child: MaterialBanner( child: MaterialBanner(
content: const Text('Content'), content: const Text('Content'),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -156,7 +156,7 @@ void main() { ...@@ -156,7 +156,7 @@ void main() {
forceActionsBelow: true, forceActionsBelow: true,
content: const Text(contentText), content: const Text(contentText),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
......
...@@ -57,7 +57,7 @@ void main() { ...@@ -57,7 +57,7 @@ void main() {
body: MaterialBanner( body: MaterialBanner(
content: const Text(contentText), content: const Text(contentText),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -83,7 +83,7 @@ void main() { ...@@ -83,7 +83,7 @@ void main() {
leading: const Icon(Icons.ac_unit), leading: const Icon(Icons.ac_unit),
content: const Text(contentText), content: const Text(contentText),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -122,7 +122,7 @@ void main() { ...@@ -122,7 +122,7 @@ void main() {
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
leadingPadding: const EdgeInsets.all(10), leadingPadding: const EdgeInsets.all(10),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -153,7 +153,7 @@ void main() { ...@@ -153,7 +153,7 @@ void main() {
body: MaterialBanner( body: MaterialBanner(
content: const Text('Content'), content: const Text('Content'),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Action'), child: const Text('Action'),
onPressed: () { }, onPressed: () { },
), ),
......
...@@ -1338,7 +1338,7 @@ void main() { ...@@ -1338,7 +1338,7 @@ void main() {
builder: (BuildContext context, StateSetter setState) { builder: (BuildContext context, StateSetter setState) {
return Scaffold( return Scaffold(
body: Center( body: Center(
child: RaisedButton( child: ElevatedButton(
child: const Text('green'), child: const Text('green'),
onPressed: () { onPressed: () {
setState(() { setState(() {
......
...@@ -738,7 +738,7 @@ class _TestPage extends StatelessWidget { ...@@ -738,7 +738,7 @@ class _TestPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return Center(
child: FlatButton( child: TextButton(
child: const Text('Show bottom sheet'), child: const Text('Show bottom sheet'),
onPressed: () { onPressed: () {
if (useRootNavigator != null) { if (useRootNavigator != null) {
......
...@@ -93,7 +93,7 @@ void main() { ...@@ -93,7 +93,7 @@ void main() {
home: Material( home: Material(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
buttonContext = context; buttonContext = context;
}, },
...@@ -211,7 +211,7 @@ void main() { ...@@ -211,7 +211,7 @@ void main() {
child: Center( child: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDatePicker( showDatePicker(
...@@ -265,7 +265,7 @@ void main() { ...@@ -265,7 +265,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showDatePicker( showDatePicker(
context: context, context: context,
...@@ -285,7 +285,7 @@ void main() { ...@@ -285,7 +285,7 @@ void main() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.datePickerCount, 0); expect(rootObserver.datePickerCount, 0);
expect(nestedObserver.datePickerCount, 1); expect(nestedObserver.datePickerCount, 1);
...@@ -304,7 +304,7 @@ void main() { ...@@ -304,7 +304,7 @@ void main() {
home: Center( home: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDatePicker( showDatePicker(
...@@ -339,7 +339,7 @@ void main() { ...@@ -339,7 +339,7 @@ void main() {
home: Center( home: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDatePicker( showDatePicker(
...@@ -705,7 +705,7 @@ void main() { ...@@ -705,7 +705,7 @@ void main() {
home: Material( home: Material(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
buttonContext = context; buttonContext = context;
}, },
......
...@@ -60,7 +60,7 @@ void main() { ...@@ -60,7 +60,7 @@ void main() {
home: Material( home: Material(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
buttonContext = context; buttonContext = context;
}, },
...@@ -629,7 +629,7 @@ void main() { ...@@ -629,7 +629,7 @@ void main() {
home: Material( home: Material(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
buttonContext = context; buttonContext = context;
}, },
......
...@@ -20,7 +20,7 @@ MaterialApp _buildAppWithDialog(Widget dialog, { ThemeData theme, double textSca ...@@ -20,7 +20,7 @@ MaterialApp _buildAppWithDialog(Widget dialog, { ThemeData theme, double textSca
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: RaisedButton( child: ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
...@@ -61,7 +61,7 @@ void main() { ...@@ -61,7 +61,7 @@ void main() {
color: Colors.green[500], color: Colors.green[500],
), ),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
onPressed: () { onPressed: () {
didPressOk = true; didPressOk = true;
}, },
...@@ -224,7 +224,7 @@ void main() { ...@@ -224,7 +224,7 @@ void main() {
const MaterialApp( const MaterialApp(
home: Material( home: Material(
child: Center( child: Center(
child: RaisedButton( child: ElevatedButton(
onPressed: null, onPressed: null,
child: Text('Go'), child: Text('Go'),
), ),
...@@ -333,7 +333,7 @@ void main() { ...@@ -333,7 +333,7 @@ void main() {
const MaterialApp( const MaterialApp(
home: Material( home: Material(
child: Center( child: Center(
child: RaisedButton( child: ElevatedButton(
onPressed: null, onPressed: null,
child: Text('Go'), child: Text('Go'),
), ),
...@@ -427,7 +427,7 @@ void main() { ...@@ -427,7 +427,7 @@ void main() {
const MaterialApp( const MaterialApp(
home: Material( home: Material(
child: Center( child: Center(
child: RaisedButton( child: ElevatedButton(
onPressed: null, onPressed: null,
child: Text(buttonText), child: Text(buttonText),
), ),
...@@ -461,7 +461,7 @@ void main() { ...@@ -461,7 +461,7 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
onPressed: () {}, onPressed: () {},
child: const Text('button'), child: const Text('button'),
), ),
...@@ -494,7 +494,7 @@ void main() { ...@@ -494,7 +494,7 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
onPressed: () {}, onPressed: () {},
child: const Text('button'), child: const Text('button'),
), ),
...@@ -531,12 +531,12 @@ void main() { ...@@ -531,12 +531,12 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
key: key1, key: key1,
onPressed: () {}, onPressed: () {},
child: const Text('button 1'), child: const Text('button 1'),
), ),
RaisedButton( ElevatedButton(
key: key2, key: key2,
onPressed: () {}, onPressed: () {},
child: const Text('button 2'), child: const Text('button 2'),
...@@ -591,12 +591,12 @@ void main() { ...@@ -591,12 +591,12 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
key: key1, key: key1,
onPressed: () {}, onPressed: () {},
child: const Text('button 1'), child: const Text('button 1'),
), ),
RaisedButton( ElevatedButton(
key: key2, key: key2,
onPressed: () {}, onPressed: () {},
child: const Text('button 2'), child: const Text('button 2'),
...@@ -765,7 +765,7 @@ void main() { ...@@ -765,7 +765,7 @@ void main() {
key: contentKey, key: contentKey,
); );
final List<Widget> actions = <Widget>[ final List<Widget> actions = <Widget>[
RaisedButton( ElevatedButton(
onPressed: () {}, onPressed: () {},
child: const Text('button'), child: const Text('button'),
), ),
...@@ -1049,12 +1049,12 @@ void main() { ...@@ -1049,12 +1049,12 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
key: key1, key: key1,
onPressed: () {}, onPressed: () {},
child: const Text('Looooooooooooooong button 1'), child: const Text('Looooooooooooooong button 1'),
), ),
RaisedButton( ElevatedButton(
key: key2, key: key2,
onPressed: () {}, onPressed: () {},
child: const Text('Looooooooooooooong button 2'), child: const Text('Looooooooooooooong button 2'),
...@@ -1072,7 +1072,7 @@ void main() { ...@@ -1072,7 +1072,7 @@ void main() {
final Rect buttonOneRect = tester.getRect(find.byKey(key1)); final Rect buttonOneRect = tester.getRect(find.byKey(key1));
final Rect buttonTwoRect = tester.getRect(find.byKey(key2)); final Rect buttonTwoRect = tester.getRect(find.byKey(key2));
// Second [RaisedButton] should appear above the first. // Second [ElevatedButton] should appear above the first.
expect(buttonTwoRect.bottom, lessThanOrEqualTo(buttonOneRect.top)); expect(buttonTwoRect.bottom, lessThanOrEqualTo(buttonOneRect.top));
}); });
...@@ -1084,12 +1084,12 @@ void main() { ...@@ -1084,12 +1084,12 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
key: key1, key: key1,
onPressed: () {}, onPressed: () {},
child: const Text('Looooooooooooooong button 1'), child: const Text('Looooooooooooooong button 1'),
), ),
RaisedButton( ElevatedButton(
key: key2, key: key2,
onPressed: () {}, onPressed: () {},
child: const Text('Looooooooooooooong button 2'), child: const Text('Looooooooooooooong button 2'),
...@@ -1117,12 +1117,12 @@ void main() { ...@@ -1117,12 +1117,12 @@ void main() {
title: const Text('title'), title: const Text('title'),
content: const Text('content'), content: const Text('content'),
actions: <Widget>[ actions: <Widget>[
RaisedButton( ElevatedButton(
key: key1, key: key1,
onPressed: () {}, onPressed: () {},
child: const Text('Looooooooooooooong button 1'), child: const Text('Looooooooooooooong button 1'),
), ),
RaisedButton( ElevatedButton(
key: key2, key: key2,
onPressed: () {}, onPressed: () {},
child: const Text('Looooooooooooooong button 2'), child: const Text('Looooooooooooooong button 2'),
...@@ -1283,7 +1283,7 @@ void main() { ...@@ -1283,7 +1283,7 @@ void main() {
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: RaisedButton( child: ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
...@@ -1333,13 +1333,13 @@ void main() { ...@@ -1333,13 +1333,13 @@ void main() {
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('TRUE'), child: const Text('TRUE'),
onPressed: () { onPressed: () {
Navigator.pop(context, true); // showDialog() returns true Navigator.pop(context, true); // showDialog() returns true
}, },
), ),
FlatButton( TextButton(
child: const Text('FALSE'), child: const Text('FALSE'),
onPressed: () { onPressed: () {
Navigator.pop(context, false); // showDialog() returns false Navigator.pop(context, false); // showDialog() returns false
...@@ -1460,7 +1460,7 @@ void main() { ...@@ -1460,7 +1460,7 @@ void main() {
child: Builder( child: Builder(
key: builderKey, key: builderKey,
builder: (BuildContext outerContext) { builder: (BuildContext outerContext) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
context: outerContext, context: outerContext,
...@@ -1480,7 +1480,7 @@ void main() { ...@@ -1480,7 +1480,7 @@ void main() {
await tester.pumpWidget(buildFrame(UniqueKey())); await tester.pumpWidget(buildFrame(UniqueKey()));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
// Force the Builder to be recreated (new key) which causes outerContext to // Force the Builder to be recreated (new key) which causes outerContext to
...@@ -1542,7 +1542,7 @@ void main() { ...@@ -1542,7 +1542,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
context: context, context: context,
...@@ -1560,7 +1560,7 @@ void main() { ...@@ -1560,7 +1560,7 @@ void main() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.dialogCount, 1); expect(rootObserver.dialogCount, 1);
expect(nestedObserver.dialogCount, 0); expect(nestedObserver.dialogCount, 0);
...@@ -1577,7 +1577,7 @@ void main() { ...@@ -1577,7 +1577,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
context: context, context: context,
...@@ -1596,7 +1596,7 @@ void main() { ...@@ -1596,7 +1596,7 @@ void main() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.dialogCount, 0); expect(rootObserver.dialogCount, 0);
expect(nestedObserver.dialogCount, 1); expect(nestedObserver.dialogCount, 1);
...@@ -1694,7 +1694,7 @@ void main() { ...@@ -1694,7 +1694,7 @@ void main() {
], ],
home: const Material( home: const Material(
child: Center( child: Center(
child: RaisedButton( child: ElevatedButton(
onPressed: null, onPressed: null,
child: Text('Go'), child: Text('Go'),
), ),
......
...@@ -15,7 +15,7 @@ MaterialApp _appWithDialog(WidgetTester tester, Widget dialog, { ThemeData theme ...@@ -15,7 +15,7 @@ MaterialApp _appWithDialog(WidgetTester tester, Widget dialog, { ThemeData theme
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: RaisedButton( child: ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
......
...@@ -678,7 +678,7 @@ void main() { ...@@ -678,7 +678,7 @@ void main() {
onPressed: () { }, onPressed: () { },
), ),
body: Center( body: Center(
child: RaisedButton( child: ElevatedButton(
child: const Text('POP'), child: const Text('POP'),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
......
...@@ -40,7 +40,7 @@ void main() { ...@@ -40,7 +40,7 @@ void main() {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: const Text('push unwrapped'), child: const Text('push unwrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -51,7 +51,7 @@ void main() { ...@@ -51,7 +51,7 @@ void main() {
); );
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('push wrapped'), child: const Text('push wrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -169,7 +169,7 @@ void main() { ...@@ -169,7 +169,7 @@ void main() {
final Widget banner = MaterialBanner( final Widget banner = MaterialBanner(
content: const Text('hello'), content: const Text('hello'),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('action'), child: const Text('action'),
onPressed: () { }, onPressed: () { },
), ),
...@@ -193,7 +193,7 @@ void main() { ...@@ -193,7 +193,7 @@ void main() {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: const Text('push unwrapped'), child: const Text('push unwrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -204,7 +204,7 @@ void main() { ...@@ -204,7 +204,7 @@ void main() {
); );
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('push wrapped'), child: const Text('push wrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -283,7 +283,7 @@ void main() { ...@@ -283,7 +283,7 @@ void main() {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: const Text('push unwrapped'), child: const Text('push unwrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -294,7 +294,7 @@ void main() { ...@@ -294,7 +294,7 @@ void main() {
); );
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('push wrapped'), child: const Text('push wrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -387,7 +387,7 @@ void main() { ...@@ -387,7 +387,7 @@ void main() {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: const Text('push unwrapped'), child: const Text('push unwrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -398,7 +398,7 @@ void main() { ...@@ -398,7 +398,7 @@ void main() {
); );
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('push wrapped'), child: const Text('push wrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -487,7 +487,7 @@ void main() { ...@@ -487,7 +487,7 @@ void main() {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: const Text('push unwrapped'), child: const Text('push unwrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -498,7 +498,7 @@ void main() { ...@@ -498,7 +498,7 @@ void main() {
); );
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('push wrapped'), child: const Text('push wrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -572,7 +572,7 @@ void main() { ...@@ -572,7 +572,7 @@ void main() {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: const Text('push unwrapped'), child: const Text('push unwrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
...@@ -583,7 +583,7 @@ void main() { ...@@ -583,7 +583,7 @@ void main() {
); );
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('push wrapped'), child: const Text('push wrapped'),
onPressed: () { onPressed: () {
Navigator.of(context).push<void>( Navigator.of(context).push<void>(
......
...@@ -14,12 +14,9 @@ void main() { ...@@ -14,12 +14,9 @@ void main() {
home: Scaffold( home: Scaffold(
appBar: AppBar(title: const Text('Button Border Test')), appBar: AppBar(title: const Text('Button Border Test')),
body: Center( body: Center(
child: RaisedButton( child: ElevatedButton(
child: const Text('Test'), child: const Text('Test'),
onPressed: () { }, onPressed: () { },
shape: Border.all(
color: Colors.blue,
),
), ),
), ),
))); )));
......
...@@ -229,10 +229,11 @@ void main() { ...@@ -229,10 +229,11 @@ void main() {
home: Scaffold( home: Scaffold(
body: Stack( body: Stack(
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
onPressed: () { onPressed: () {
pressed = true; pressed = true;
}, },
child: null,
), ),
Material( Material(
type: MaterialType.transparency, type: MaterialType.transparency,
...@@ -246,7 +247,7 @@ void main() { ...@@ -246,7 +247,7 @@ void main() {
), ),
), ),
); );
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(pressed, isTrue); expect(pressed, isTrue);
}); });
......
...@@ -282,7 +282,7 @@ void main() { ...@@ -282,7 +282,7 @@ void main() {
testWidgets('back gesture while OS changes', (WidgetTester tester) async { testWidgets('back gesture while OS changes', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => Material( '/': (BuildContext context) => Material(
child: FlatButton( child: TextButton(
child: const Text('PUSH'), child: const Text('PUSH'),
onPressed: () { Navigator.of(context).pushNamed('/b'); }, onPressed: () { Navigator.of(context).pushNamed('/b'); },
), ),
...@@ -582,7 +582,7 @@ void main() { ...@@ -582,7 +582,7 @@ void main() {
home: Scaffold( home: Scaffold(
key: scaffoldKey, key: scaffoldKey,
body: Center( body: Center(
child: RaisedButton( child: ElevatedButton(
onPressed: () { onPressed: () {
Navigator.push<void>(scaffoldKey.currentContext, MaterialPageRoute<void>( Navigator.push<void>(scaffoldKey.currentContext, MaterialPageRoute<void>(
builder: (BuildContext context) { builder: (BuildContext context) {
......
...@@ -26,7 +26,7 @@ void main() { ...@@ -26,7 +26,7 @@ void main() {
testWidgets('Default PageTransitionsTheme builds a CupertionPageTransition', (WidgetTester tester) async { testWidgets('Default PageTransitionsTheme builds a CupertionPageTransition', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => Material( '/': (BuildContext context) => Material(
child: FlatButton( child: TextButton(
child: const Text('push'), child: const Text('push'),
onPressed: () { Navigator.of(context).pushNamed('/b'); }, onPressed: () { Navigator.of(context).pushNamed('/b'); },
), ),
...@@ -52,7 +52,7 @@ void main() { ...@@ -52,7 +52,7 @@ void main() {
testWidgets('Default PageTransitionsTheme builds a _FadeUpwardsPageTransition for android', (WidgetTester tester) async { testWidgets('Default PageTransitionsTheme builds a _FadeUpwardsPageTransition for android', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => Material( '/': (BuildContext context) => Material(
child: FlatButton( child: TextButton(
child: const Text('push'), child: const Text('push'),
onPressed: () { Navigator.of(context).pushNamed('/b'); }, onPressed: () { Navigator.of(context).pushNamed('/b'); },
), ),
...@@ -85,7 +85,7 @@ void main() { ...@@ -85,7 +85,7 @@ void main() {
testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', (WidgetTester tester) async { testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => Material( '/': (BuildContext context) => Material(
child: FlatButton( child: TextButton(
child: const Text('push'), child: const Text('push'),
onPressed: () { Navigator.of(context).pushNamed('/b'); }, onPressed: () { Navigator.of(context).pushNamed('/b'); },
), ),
...@@ -125,7 +125,7 @@ void main() { ...@@ -125,7 +125,7 @@ void main() {
testWidgets('PageTransitionsTheme override builds a _ZoomPageTransition', (WidgetTester tester) async { testWidgets('PageTransitionsTheme override builds a _ZoomPageTransition', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => Material( '/': (BuildContext context) => Material(
child: FlatButton( child: TextButton(
child: const Text('push'), child: const Text('push'),
onPressed: () { Navigator.of(context).pushNamed('/b'); }, onPressed: () { Navigator.of(context).pushNamed('/b'); },
), ),
...@@ -169,7 +169,7 @@ void main() { ...@@ -169,7 +169,7 @@ void main() {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => Material( '/': (BuildContext context) => Material(
child: FlatButton( child: TextButton(
child: const Text('push'), child: const Text('push'),
onPressed: () { Navigator.of(context).pushNamed('/b'); }, onPressed: () { Navigator.of(context).pushNamed('/b'); },
), ),
...@@ -177,7 +177,7 @@ void main() { ...@@ -177,7 +177,7 @@ void main() {
'/b': (BuildContext context) => StatefulBuilder( '/b': (BuildContext context) => StatefulBuilder(
builder: (BuildContext context, StateSetter setState) { builder: (BuildContext context, StateSetter setState) {
builtCount++; // Increase [builtCount] each time the widget build builtCount++; // Increase [builtCount] each time the widget build
return FlatButton( return TextButton(
child: const Text('pop'), child: const Text('pop'),
onPressed: () { Navigator.pop(context); }, onPressed: () { Navigator.pop(context); },
); );
......
...@@ -433,7 +433,7 @@ void main() { ...@@ -433,7 +433,7 @@ void main() {
height: 200.0, height: 200.0,
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('showModalBottomSheet'), child: const Text('showModalBottomSheet'),
onPressed: () { onPressed: () {
showModalBottomSheet<void>( showModalBottomSheet<void>(
......
...@@ -1101,7 +1101,7 @@ void main() { ...@@ -1101,7 +1101,7 @@ void main() {
child: Center( child: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
// Ensure showMenu throws an assertion without a position // Ensure showMenu throws an assertion without a position
expect(() { expect(() {
...@@ -1440,7 +1440,7 @@ void main() { ...@@ -1440,7 +1440,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showMenu<int>( showMenu<int>(
context: context, context: context,
...@@ -1461,7 +1461,7 @@ void main() { ...@@ -1461,7 +1461,7 @@ void main() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.menuCount, 0); expect(rootObserver.menuCount, 0);
expect(nestedObserver.menuCount, 1); expect(nestedObserver.menuCount, 1);
...@@ -1478,7 +1478,7 @@ void main() { ...@@ -1478,7 +1478,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showMenu<int>( showMenu<int>(
context: context, context: context,
...@@ -1500,7 +1500,7 @@ void main() { ...@@ -1500,7 +1500,7 @@ void main() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.menuCount, 1); expect(rootObserver.menuCount, 1);
expect(nestedObserver.menuCount, 0); expect(nestedObserver.menuCount, 0);
......
...@@ -1370,13 +1370,13 @@ void main() { ...@@ -1370,13 +1370,13 @@ void main() {
divisions: divisions, divisions: divisions,
onChanged: onChanged, onChanged: onChanged,
), ),
RaisedButton( ElevatedButton(
child: const Text('Next'), child: const Text('Next'),
onPressed: () { onPressed: () {
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute<void>( MaterialPageRoute<void>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('Inner page'), child: const Text('Inner page'),
onPressed: () { Navigator.of(context).pop(); }, onPressed: () { Navigator.of(context).pop(); },
); );
......
...@@ -431,7 +431,7 @@ void main() { ...@@ -431,7 +431,7 @@ void main() {
), ),
), ),
persistentFooterButtons: <Widget>[ persistentFooterButtons: <Widget>[
FlatButton( TextButton(
onPressed: () { onPressed: () {
didPressButton = true; didPressButton = true;
}, },
...@@ -657,7 +657,7 @@ void main() { ...@@ -657,7 +657,7 @@ void main() {
child: MediaQuery( child: MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: Scaffold( child: Scaffold(
body: FlatButton( body: TextButton(
key: testKey, key: testKey,
onPressed: () { }, onPressed: () { },
child: const Text(''), child: const Text(''),
...@@ -665,7 +665,7 @@ void main() { ...@@ -665,7 +665,7 @@ void main() {
), ),
), ),
)); ));
expect(tester.element(find.byKey(testKey)).size, const Size(88.0, 48.0)); expect(tester.element(find.byKey(testKey)).size, const Size(64.0, 48.0));
expect(tester.renderObject<RenderBox>(find.byKey(testKey)).localToGlobal(Offset.zero), const Offset(0.0, 0.0)); expect(tester.renderObject<RenderBox>(find.byKey(testKey)).localToGlobal(Offset.zero), const Offset(0.0, 0.0));
}); });
......
...@@ -2041,13 +2041,13 @@ void main() { ...@@ -2041,13 +2041,13 @@ void main() {
value = newValue; value = newValue;
}, },
), ),
RaisedButton( ElevatedButton(
child: const Text('Next'), child: const Text('Next'),
onPressed: () { onPressed: () {
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute<void>( MaterialPageRoute<void>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('Inner page'), child: const Text('Inner page'),
onPressed: () { Navigator.of(context).pop(); }, onPressed: () { Navigator.of(context).pop(); },
); );
...@@ -2100,7 +2100,7 @@ void main() { ...@@ -2100,7 +2100,7 @@ void main() {
), ),
); );
// Represents the RaisedButton with inner Text, inner page. // Represents the ElevatedButton with inner Text, inner page.
expect(valueIndicatorBox, paintsExactlyCountTimes(#drawPath, 1)); expect(valueIndicatorBox, paintsExactlyCountTimes(#drawPath, 1));
expect(valueIndicatorBox, paintsExactlyCountTimes(#drawParagraph, 1)); expect(valueIndicatorBox, paintsExactlyCountTimes(#drawParagraph, 1));
......
...@@ -2463,7 +2463,7 @@ void main() { ...@@ -2463,7 +2463,7 @@ void main() {
tabs: List<Widget>.generate(controller.length, (int index) => Tab(text: 'Tab$index')), tabs: List<Widget>.generate(controller.length, (int index) => Tab(text: 'Tab$index')),
), ),
actions: <Widget>[ actions: <Widget>[
FlatButton( TextButton(
child: const Text('Change TabController length'), child: const Text('Change TabController length'),
onPressed: () { onPressed: () {
setState(() { setState(() {
......
...@@ -164,7 +164,7 @@ void main() { ...@@ -164,7 +164,7 @@ void main() {
body: Center( body: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: context, context: context,
...@@ -201,7 +201,7 @@ void main() { ...@@ -201,7 +201,7 @@ void main() {
body: Center( body: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
context: context, context: context,
......
...@@ -39,7 +39,7 @@ class _TimePickerLauncher extends StatelessWidget { ...@@ -39,7 +39,7 @@ class _TimePickerLauncher extends StatelessWidget {
child: Center( child: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () async { onPressed: () async {
onChanged(await showTimePicker( onChanged(await showTimePicker(
...@@ -69,7 +69,7 @@ Future<Offset> startPicker( ...@@ -69,7 +69,7 @@ Future<Offset> startPicker(
} }
Future<void> finishPicker(WidgetTester tester) async { Future<void> finishPicker(WidgetTester tester) async {
final MaterialLocalizations materialLocalizations = MaterialLocalizations.of(tester.element(find.byType(RaisedButton))); final MaterialLocalizations materialLocalizations = MaterialLocalizations.of(tester.element(find.byType(ElevatedButton)));
await tester.tap(find.text(materialLocalizations.okButtonLabel)); await tester.tap(find.text(materialLocalizations.okButtonLabel));
await tester.pumpAndSettle(const Duration(seconds: 1)); await tester.pumpAndSettle(const Duration(seconds: 1));
} }
...@@ -499,7 +499,7 @@ void _tests() { ...@@ -499,7 +499,7 @@ void _tests() {
child: Center( child: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showTimePicker( showTimePicker(
...@@ -551,7 +551,7 @@ void _tests() { ...@@ -551,7 +551,7 @@ void _tests() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showTimePicker( showTimePicker(
context: context, context: context,
...@@ -567,7 +567,7 @@ void _tests() { ...@@ -567,7 +567,7 @@ void _tests() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.pickerCount, 1); expect(rootObserver.pickerCount, 1);
expect(nestedObserver.pickerCount, 0); expect(nestedObserver.pickerCount, 0);
...@@ -584,7 +584,7 @@ void _tests() { ...@@ -584,7 +584,7 @@ void _tests() {
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>( return MaterialPageRoute<dynamic>(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
onPressed: () { onPressed: () {
showTimePicker( showTimePicker(
context: context, context: context,
...@@ -601,7 +601,7 @@ void _tests() { ...@@ -601,7 +601,7 @@ void _tests() {
)); ));
// Open the dialog. // Open the dialog.
await tester.tap(find.byType(RaisedButton)); await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.pickerCount, 0); expect(rootObserver.pickerCount, 0);
expect(nestedObserver.pickerCount, 1); expect(nestedObserver.pickerCount, 1);
...@@ -616,7 +616,7 @@ void _tests() { ...@@ -616,7 +616,7 @@ void _tests() {
child: Center( child: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () async { onPressed: () async {
await showTimePicker( await showTimePicker(
...@@ -805,7 +805,7 @@ Future<void> mediaQueryBoilerplate( ...@@ -805,7 +805,7 @@ Future<void> mediaQueryBoilerplate(
child: Navigator( child: Navigator(
onGenerateRoute: (RouteSettings settings) { onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<void>(builder: (BuildContext context) { return MaterialPageRoute<void>(builder: (BuildContext context) {
return FlatButton( return TextButton(
onPressed: () { onPressed: () {
showTimePicker( showTimePicker(
context: context, context: context,
......
...@@ -426,7 +426,7 @@ class _TimePickerLauncher extends StatelessWidget { ...@@ -426,7 +426,7 @@ class _TimePickerLauncher extends StatelessWidget {
child: Center( child: Center(
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return RaisedButton( return ElevatedButton(
child: const Text('X'), child: const Text('X'),
onPressed: () async { onPressed: () async {
await showTimePicker( await showTimePicker(
......
...@@ -84,7 +84,7 @@ void main() { ...@@ -84,7 +84,7 @@ void main() {
body: Builder( body: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: FlatButton( child: TextButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
showDialog<void>( showDialog<void>(
...@@ -138,7 +138,7 @@ void main() { ...@@ -138,7 +138,7 @@ void main() {
body: Builder( body: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: FlatButton( child: TextButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
Navigator.of(context).push(MaterialPageRoute<void>( Navigator.of(context).push(MaterialPageRoute<void>(
...@@ -183,7 +183,7 @@ void main() { ...@@ -183,7 +183,7 @@ void main() {
body: Builder( body: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: FlatButton( child: TextButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
Navigator.of(context).push(MaterialPageRoute<void>( Navigator.of(context).push(MaterialPageRoute<void>(
...@@ -236,11 +236,11 @@ void main() { ...@@ -236,11 +236,11 @@ void main() {
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
actions: <Widget> [ actions: <Widget> [
FlatButton( TextButton(
child: const Text('YES'), child: const Text('YES'),
onPressed: () { Navigator.of(context).pop(true); }, onPressed: () { Navigator.of(context).pop(true); },
), ),
FlatButton( TextButton(
child: const Text('NO'), child: const Text('NO'),
onPressed: () { Navigator.of(context).pop(false); }, onPressed: () { Navigator.of(context).pop(false); },
), ),
...@@ -257,7 +257,7 @@ void main() { ...@@ -257,7 +257,7 @@ void main() {
body: Builder( body: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: FlatButton( child: TextButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
Navigator.of(context).push(MaterialPageRoute<void>( Navigator.of(context).push(MaterialPageRoute<void>(
...@@ -343,7 +343,7 @@ void main() { ...@@ -343,7 +343,7 @@ void main() {
body: Builder( body: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Center( return Center(
child: FlatButton( child: TextButton(
child: const Text('X'), child: const Text('X'),
onPressed: () { onPressed: () {
Navigator.of(context).push(route); Navigator.of(context).push(route);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment