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

This commit is contained in:
Darren Austin 2020-07-28 10:36:19 -07:00 committed by GitHub
parent 9bf1793a10
commit 76c7ca5433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -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);

View File

@ -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,