mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Updated tests to use new button classes. (#63040)
This commit is contained in:
parent
fa60f525f0
commit
e9117c1902
@ -104,7 +104,7 @@ void main() {
|
||||
home: Material(
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
onPressed: () async {
|
||||
await showDatePicker(
|
||||
context: context,
|
||||
@ -147,7 +147,7 @@ void main() {
|
||||
home: Material(
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
onPressed: () async {
|
||||
await showDatePicker(
|
||||
context: context,
|
||||
@ -187,7 +187,7 @@ void main() {
|
||||
home: Material(
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
onPressed: () async {
|
||||
await showDatePicker(
|
||||
context: context,
|
||||
@ -242,7 +242,7 @@ void main() {
|
||||
return Localizations(
|
||||
locale: locale,
|
||||
delegates: GlobalMaterialLocalizations.delegates,
|
||||
child: RaisedButton(
|
||||
child: TextButton(
|
||||
child: const Text('X'),
|
||||
onPressed: () {
|
||||
showDatePicker(
|
||||
|
@ -23,7 +23,7 @@ class _TimePickerLauncher extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return RaisedButton(
|
||||
return ElevatedButton(
|
||||
child: const Text('X'),
|
||||
onPressed: () async {
|
||||
onChanged(await showTimePicker(
|
||||
@ -52,7 +52,7 @@ Future<Offset> startPicker(
|
||||
}
|
||||
|
||||
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.pumpAndSettle(const Duration(seconds: 1));
|
||||
}
|
||||
@ -248,7 +248,7 @@ void main() {
|
||||
child: Navigator(
|
||||
onGenerateRoute: (RouteSettings settings) {
|
||||
return MaterialPageRoute<void>(builder: (BuildContext context) {
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
onPressed: () {
|
||||
showTimePicker(context: context, initialTime: const TimeOfDay(hour: 7, minute: 0));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user