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
682243ef
Commit
682243ef
authored
Jan 10, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1156 from abarth/edge_swipe
Drawer edge swipe convers entire screen
parents
4d696e62
1ef3f82e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
38 deletions
+40
-38
drawer.dart
packages/flutter/lib/src/material/drawer.dart
+40
-38
No files found.
packages/flutter/lib/src/material/drawer.dart
View file @
682243ef
...
...
@@ -152,20 +152,27 @@ class DrawerControllerState extends State<DrawerController> {
}
final
AnimatedColorValue
_color
=
new
AnimatedColorValue
(
Colors
.
transparent
,
end:
Colors
.
black54
);
final
GlobalKey
_gestureDetectorKey
=
new
GlobalKey
();
Widget
build
(
BuildContext
context
)
{
HitTestBehavior
behavior
;
Widget
child
;
if
(
_performance
.
status
==
PerformanceStatus
.
dismissed
)
{
behavior
=
HitTestBehavior
.
translucent
;
child
=
new
Align
(
return
new
Align
(
alignment:
const
FractionalOffset
(
0.0
,
0.5
),
widthFactor:
1.0
,
child:
new
GestureDetector
(
key:
_gestureDetectorKey
,
onHorizontalDragUpdate:
_move
,
onHorizontalDragEnd:
_settle
,
behavior:
HitTestBehavior
.
translucent
,
child:
new
Container
(
width:
_kEdgeDragWidth
)
)
);
}
else
{
_performance
.
updateVariable
(
_color
);
child
=
new
RepaintBoundary
(
return
new
GestureDetector
(
key:
_gestureDetectorKey
,
onHorizontalDragUpdate:
_move
,
onHorizontalDragEnd:
_settle
,
child:
new
RepaintBoundary
(
child:
new
Stack
(<
Widget
>[
new
GestureDetector
(
onTap:
close
,
...
...
@@ -196,13 +203,8 @@ class DrawerControllerState extends State<DrawerController> {
)
)
])
)
);
}
return
new
GestureDetector
(
onHorizontalDragUpdate:
_move
,
onHorizontalDragEnd:
_settle
,
behavior:
behavior
,
child:
child
);
}
}
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