Unverified Commit 2097fe64 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

`CupertinoPicker`: Update example (#98525)

parent 0c957116
......@@ -8,12 +8,12 @@ import 'package:flutter/cupertino.dart';
const double _kItemExtent = 32.0;
const List<String> _fruitNames = <String>[
'🍎 Apple',
'🥭 Mango',
'🍌 Banana',
'🍊 Orange',
'🍍 Pineapple',
'🍓 Strawberry',
'Apple',
'Mango',
'Banana',
'Orange',
'Pineapple',
'Strawberry',
];
void main() => runApp(const MyApp());
......
......@@ -14,11 +14,11 @@ void main() {
);
// Open the Cupertino picker.
await tester.tap(find.text('🍎 Apple'));
await tester.tap(find.text('Apple'));
await tester.pumpAndSettle();
// Drag the wheel to change fruit selection.
await tester.drag(find.text('🥭 Mango'), _kRowOffset, touchSlopY: 0, warnIfMissed: false); // see top of file
await tester.drag(find.text('Mango'), _kRowOffset, touchSlopY: 0, warnIfMissed: false); // see top of file
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
......@@ -27,6 +27,6 @@ void main() {
await tester.tapAt(const Offset(1.0, 1.0));
await tester.pumpAndSettle();
expect(find.text('🍌 Banana'), findsOneWidget);
expect(find.text('Banana'), findsOneWidget);
});
}
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