Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2097fe64
Unverified
Commit
2097fe64
authored
Feb 16, 2022
by
Taha Tesser
Committed by
GitHub
Feb 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`CupertinoPicker`: Update example (#98525)
parent
0c957116
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
cupertino_picker.0.dart
examples/api/lib/cupertino/picker/cupertino_picker.0.dart
+6
-6
cupertino_picker.0_test.dart
...es/api/test/cupertino/picker/cupertino_picker.0_test.dart
+3
-3
No files found.
examples/api/lib/cupertino/picker/cupertino_picker.0.dart
View file @
2097fe64
...
...
@@ -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
());
...
...
examples/api/test/cupertino/picker/cupertino_picker.0_test.dart
View file @
2097fe64
...
...
@@ -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
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment