Unverified Commit 76c7ca54 authored by Darren Austin's avatar Darren Austin Committed by GitHub

Updated the About dialog to use the new button API. (#62075)

parent 9bf1793a
......@@ -19,7 +19,6 @@ import 'card.dart';
import 'constants.dart';
import 'debug.dart';
import 'dialog.dart';
import 'flat_button.dart';
import 'floating_action_button.dart';
import 'floating_action_button_location.dart';
import 'ink_decoration.dart';
......@@ -31,6 +30,7 @@ import 'page_transitions_theme.dart';
import 'progress_indicator.dart';
import 'scaffold.dart';
import 'scrollbar.dart';
import 'text_button.dart';
import 'text_theme.dart';
import 'theme.dart';
......@@ -97,7 +97,7 @@ import 'theme.dart';
/// ),
/// ),
/// body: Center(
/// child: RaisedButton(
/// child: ElevatedButton(
/// child: Text('Show About Example'),
/// onPressed: () {
/// showAboutDialog(
......@@ -406,7 +406,7 @@ class AboutDialog extends StatelessWidget {
],
),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(MaterialLocalizations.of(context).viewLicensesButtonLabel),
onPressed: () {
showLicensePage(
......@@ -418,7 +418,7 @@ class AboutDialog extends StatelessWidget {
);
},
),
FlatButton(
TextButton(
child: Text(MaterialLocalizations.of(context).closeButtonLabel),
onPressed: () {
Navigator.pop(context);
......
......@@ -358,7 +358,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) {
return PageRouteBuilder<dynamic>(
pageBuilder: (BuildContext context, _, __) {
return RaisedButton(
return ElevatedButton(
onPressed: () {
showLicensePage(
context: context,
......@@ -376,7 +376,7 @@ void main() {
));
// Open the dialog.
await tester.tap(find.byType(RaisedButton));
await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.licensePageCount, 0);
expect(nestedObserver.licensePageCount, 1);
......@@ -396,7 +396,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) {
return PageRouteBuilder<dynamic>(
pageBuilder: (BuildContext context, _, __) {
return RaisedButton(
return ElevatedButton(
onPressed: () {
showLicensePage(
context: context,
......@@ -415,7 +415,7 @@ void main() {
));
// Open the dialog.
await tester.tap(find.byType(RaisedButton));
await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.licensePageCount, 1);
expect(nestedObserver.licensePageCount, 0);
......@@ -432,7 +432,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>(
builder: (BuildContext context) {
return RaisedButton(
return ElevatedButton(
onPressed: () {
showAboutDialog(
context: context,
......@@ -448,7 +448,7 @@ void main() {
));
// Open the dialog.
await tester.tap(find.byType(RaisedButton));
await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.dialogCount, 1);
expect(nestedObserver.dialogCount, 0);
......@@ -465,7 +465,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>(
builder: (BuildContext context) {
return RaisedButton(
return ElevatedButton(
onPressed: () {
showAboutDialog(
context: context,
......@@ -482,7 +482,7 @@ void main() {
));
// Open the dialog.
await tester.tap(find.byType(RaisedButton));
await tester.tap(find.byType(ElevatedButton));
expect(rootObserver.dialogCount, 0);
expect(nestedObserver.dialogCount, 1);
......@@ -515,7 +515,7 @@ void main() {
onGenerateRoute: (RouteSettings settings) {
return MaterialPageRoute<dynamic>(
builder: (BuildContext context) {
return RaisedButton(
return ElevatedButton(
onPressed: () {
showAboutDialog(
context: context,
......
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