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
f97a125e
Commit
f97a125e
authored
Nov 19, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #487 from abarth/fix_menu_crash
Popup menu in Stocks throws exception
parents
2e2aa748
2d824894
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
27 deletions
+28
-27
drawer.dart
packages/flutter/lib/src/material/drawer.dart
+22
-20
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+1
-1
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+3
-3
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+2
-3
No files found.
packages/flutter/lib/src/material/drawer.dart
View file @
f97a125e
...
...
@@ -62,25 +62,27 @@ class _DrawerRoute extends OverlayRoute {
_DrawerState
_state
=
_DrawerState
.
showing
;
Widget
_build
(
BuildContext
context
)
{
return
new
_DrawerController
(
key:
_drawerKey
,
settleDuration:
_kBaseSettleDuration
,
onClosed:
()
{
_DrawerState
previousState
=
_state
;
_state
=
_DrawerState
.
closed
;
switch
(
previousState
)
{
case
_DrawerState
.
showing
:
Navigator
.
of
(
context
).
pop
();
break
;
case
_DrawerState
.
popped
:
super
.
didPop
(
null
);
break
;
case
_DrawerState
.
closed
:
assert
(
false
);
break
;
}
},
child:
new
_Drawer
(
route:
this
)
return
new
RepaintBoundary
(
child:
new
_DrawerController
(
key:
_drawerKey
,
settleDuration:
_kBaseSettleDuration
,
onClosed:
()
{
_DrawerState
previousState
=
_state
;
_state
=
_DrawerState
.
closed
;
switch
(
previousState
)
{
case
_DrawerState
.
showing
:
Navigator
.
of
(
context
).
pop
();
break
;
case
_DrawerState
.
popped
:
super
.
didPop
(
null
);
break
;
case
_DrawerState
.
closed
:
assert
(
false
);
break
;
}
},
child:
new
_Drawer
(
route:
this
)
)
);
}
...
...
@@ -202,7 +204,7 @@ class _DrawerControllerState extends State<_DrawerController> {
widthFactor:
_performance
.
progress
,
child:
new
SizeObserver
(
onSizeChanged:
_handleSizeChanged
,
child:
new
ForcedLayer
(
child:
new
RepaintBoundary
(
child:
config
.
child
)
)
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
f97a125e
...
...
@@ -1061,7 +1061,7 @@ class RenderPointerListener extends RenderProxyBox {
/// previously. Similarly, when the child repaints but the surround tree does
/// not, we can re-record its display list without re-recording the display list
/// for the surround tree.
class
Render
ForcedLayer
extends
RenderProxyBox
{
class
Render
RepaintBoundary
extends
RenderProxyBox
{
bool
get
hasLayer
=>
true
;
}
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
f97a125e
...
...
@@ -1337,9 +1337,9 @@ class Listener extends OneChildRenderObjectWidget {
}
}
class
ForcedLayer
extends
OneChildRenderObjectWidget
{
ForcedLayer
({
Key
key
,
Widget
child
})
:
super
(
key:
key
,
child:
child
);
Render
ForcedLayer
createRenderObject
()
=>
new
RenderForcedLayer
();
class
RepaintBoundary
extends
OneChildRenderObjectWidget
{
RepaintBoundary
({
Key
key
,
Widget
child
})
:
super
(
key:
key
,
child:
child
);
Render
RepaintBoundary
createRenderObject
()
=>
new
RenderRepaintBoundary
();
}
class
IgnorePointer
extends
OneChildRenderObjectWidget
{
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
f97a125e
...
...
@@ -39,9 +39,7 @@ abstract class OverlayRoute extends Route {
void
didPush
(
OverlayState
overlay
,
OverlayEntry
insertionPoint
)
{
for
(
WidgetBuilder
builder
in
builders
)
{
_overlayEntries
.
add
(
new
OverlayEntry
(
builder:
(
BuildContext
context
)
{
return
new
ForcedLayer
(
child:
builder
(
context
));
}));
_overlayEntries
.
add
(
new
OverlayEntry
(
builder:
builder
));
overlay
?.
insert
(
_overlayEntries
.
last
,
above:
insertionPoint
);
insertionPoint
=
_overlayEntries
.
last
;
}
...
...
@@ -170,6 +168,7 @@ class _ModalScope extends StatusTransitionComponent {
)
);
}
contents
=
new
RepaintBoundary
(
child:
contents
);
ModalPosition
position
=
route
.
position
;
if
(
position
==
null
)
return
contents
;
...
...
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