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
144e21b3
Unverified
Commit
144e21b3
authored
Jun 11, 2021
by
Darren Austin
Committed by
GitHub
Jun 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReorderableListView should treat fuchsia as a mobile platform. (#84393)
parent
0347c533
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
reorderable_list.dart
packages/flutter/lib/src/material/reorderable_list.dart
+1
-1
reorderable_list_test.dart
packages/flutter/test/material/reorderable_list_test.dart
+14
-0
No files found.
packages/flutter/lib/src/material/reorderable_list.dart
View file @
144e21b3
...
...
@@ -421,7 +421,6 @@ class _ReorderableListViewState extends State<ReorderableListView> {
if
(
widget
.
buildDefaultDragHandles
)
{
switch
(
Theme
.
of
(
context
).
platform
)
{
case
TargetPlatform
.
fuchsia
:
case
TargetPlatform
.
linux
:
case
TargetPlatform
.
windows
:
case
TargetPlatform
.
macOS
:
...
...
@@ -470,6 +469,7 @@ class _ReorderableListViewState extends State<ReorderableListView> {
case
TargetPlatform
.
iOS
:
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
return
ReorderableDelayedDragStartListener
(
key:
itemGlobalKey
,
index:
index
,
...
...
packages/flutter/test/material/reorderable_list_test.dart
View file @
144e21b3
...
...
@@ -1366,6 +1366,20 @@ void main() {
});
// TODO(djshuckerow): figure out how to write a test for scrolling the list.
testWidgets
(
'ReorderableListView on desktop platforms should have drag handles'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
build
());
// All four items should have drag handles and not delayed listeners.
expect
(
find
.
byIcon
(
Icons
.
drag_handle
),
findsNWidgets
(
4
));
expect
(
find
.
byType
(
ReorderableDelayedDragStartListener
),
findsNothing
);
},
variant:
TargetPlatformVariant
.
desktop
());
testWidgets
(
'ReorderableListView on mobile platforms should not have drag handles'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
build
());
// All four items should have delayed listeners and not drag handles.
expect
(
find
.
byType
(
ReorderableDelayedDragStartListener
),
findsNWidgets
(
4
));
expect
(
find
.
byIcon
(
Icons
.
drag_handle
),
findsNothing
);
},
variant:
TargetPlatformVariant
.
mobile
());
testWidgets
(
'Vertical list renders drag handle in correct position'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
build
(
platform:
TargetPlatform
.
macOS
));
final
Finder
listView
=
find
.
byType
(
ReorderableListView
);
...
...
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