Unverified Commit fd935768 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Replaced obsolete use of FlatButton with TextButton in scroll_activity_test (#66602)

parent 890e6cce
...@@ -58,13 +58,13 @@ void main() { ...@@ -58,13 +58,13 @@ void main() {
expect(find.text('Page 1'), findsNothing); expect(find.text('Page 1'), findsNothing);
expect(find.text('Page 5'), findsNothing); expect(find.text('Page 5'), findsNothing);
expect(find.text('Page 100'), findsOneWidget); expect(find.text('Page 100'), findsOneWidget);
await tester.tap(find.byType(FlatButton)); // 6 await tester.tap(find.byType(TextButton)); // 6
await tester.pump(); await tester.pump();
expect(find.text('Page 1'), findsNothing); expect(find.text('Page 1'), findsNothing);
expect(find.text('Page 6'), findsNothing); expect(find.text('Page 6'), findsNothing);
expect(find.text('Page 5'), findsNothing); expect(find.text('Page 5'), findsNothing);
expect(find.text('Page 100'), findsOneWidget); expect(find.text('Page 100'), findsOneWidget);
await tester.tap(find.byType(FlatButton)); // 7 await tester.tap(find.byType(TextButton)); // 7
await tester.pump(); await tester.pump();
expect(find.text('Page 1'), findsNothing); expect(find.text('Page 1'), findsNothing);
expect(find.text('Page 6'), findsNothing); expect(find.text('Page 6'), findsNothing);
...@@ -82,7 +82,7 @@ void main() { ...@@ -82,7 +82,7 @@ void main() {
expect(find.text('Page 4'), findsOneWidget); expect(find.text('Page 4'), findsOneWidget);
expect(find.text('Page 5'), findsNothing); expect(find.text('Page 5'), findsNothing);
expect(find.text('Page 100'), findsNothing); expect(find.text('Page 100'), findsNothing);
await tester.tap(find.byType(FlatButton)); // 8 await tester.tap(find.byType(TextButton)); // 8
await tester.pump(); await tester.pump();
expect(find.text('Page 1'), findsNothing); expect(find.text('Page 1'), findsNothing);
expect(find.text('Page 8'), findsNothing); expect(find.text('Page 8'), findsNothing);
...@@ -107,7 +107,7 @@ void main() { ...@@ -107,7 +107,7 @@ void main() {
await tester.drag(find.byType(PageView62209), const Offset(800.0, 0.0)); await tester.drag(find.byType(PageView62209), const Offset(800.0, 0.0));
await tester.pump(); await tester.pump();
expect(find.text('Page 1'), findsOneWidget); expect(find.text('Page 1'), findsOneWidget);
await tester.tap(find.byType(FlatButton)); // 9 await tester.tap(find.byType(TextButton)); // 9
await tester.pump(); await tester.pump();
expect(find.text('Page 1'), findsOneWidget); expect(find.text('Page 1'), findsOneWidget);
expect(find.text('Page 9'), findsNothing); expect(find.text('Page 9'), findsNothing);
...@@ -146,7 +146,7 @@ class _PageView62209State extends State<PageView62209> { ...@@ -146,7 +146,7 @@ class _PageView62209State extends State<PageView62209> {
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
Expanded(child: Carousel62209(pages: _pages)), Expanded(child: Carousel62209(pages: _pages)),
FlatButton( TextButton(
child: const Text('ADD PAGE'), child: const Text('ADD PAGE'),
onPressed: () { onPressed: () {
setState(() { setState(() {
......
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