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(
|
home: Material(
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await showDatePicker(
|
await showDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
@ -147,7 +147,7 @@ void main() {
|
|||||||
home: Material(
|
home: Material(
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await showDatePicker(
|
await showDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
@ -187,7 +187,7 @@ void main() {
|
|||||||
home: Material(
|
home: Material(
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await showDatePicker(
|
await showDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
@ -242,7 +242,7 @@ void main() {
|
|||||||
return Localizations(
|
return Localizations(
|
||||||
locale: locale,
|
locale: locale,
|
||||||
delegates: GlobalMaterialLocalizations.delegates,
|
delegates: GlobalMaterialLocalizations.delegates,
|
||||||
child: RaisedButton(
|
child: TextButton(
|
||||||
child: const Text('X'),
|
child: const Text('X'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showDatePicker(
|
showDatePicker(
|
||||||
|
@ -23,7 +23,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(
|
||||||
@ -52,7 +52,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));
|
||||||
}
|
}
|
||||||
@ -248,7 +248,7 @@ void main() {
|
|||||||
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(context: context, initialTime: const TimeOfDay(hour: 7, minute: 0));
|
showTimePicker(context: context, initialTime: const TimeOfDay(hour: 7, minute: 0));
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user