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
78ba7d92
Commit
78ba7d92
authored
Nov 03, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1934 from abarth/stocks_list
Stocks list doesn't update when stocks are loaded
parents
98c0282f
78d35391
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
42 additions
and
43 deletions
+42
-43
bottom_sheet.dart
packages/flutter/lib/src/material/bottom_sheet.dart
+1
-1
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+1
-1
drawer.dart
packages/flutter/lib/src/material/drawer.dart
+3
-1
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+4
-4
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+1
-1
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+5
-5
hero_controller.dart
packages/flutter/lib/src/widgets/hero_controller.dart
+1
-1
modal_barrier.dart
packages/flutter/lib/src/widgets/modal_barrier.dart
+13
-10
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+7
-13
page.dart
packages/flutter/lib/src/widgets/page.dart
+1
-1
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+3
-4
heroes_test.dart
packages/unit/test/widget/heroes_test.dart
+2
-1
No files found.
packages/flutter/lib/src/material/bottom_sheet.dart
View file @
78ba7d92
...
...
@@ -111,7 +111,7 @@ class _ModalBottomSheetRoute extends ModalRoute {
}
Color
get
barrierColor
=>
Colors
.
black54
;
Widget
createModalWidget
(
)
=>
new
_BottomSheet
(
route:
this
);
Widget
buildModalWidget
(
BuildContext
context
)
=>
new
_BottomSheet
(
route:
this
);
void
didPop
([
dynamic
result
])
{
completer
.
complete
(
result
);
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
78ba7d92
...
...
@@ -125,7 +125,7 @@ class _DialogRoute extends ModalRoute {
Duration
get
transitionDuration
=>
const
Duration
(
milliseconds:
150
);
Color
get
barrierColor
=>
Colors
.
black54
;
Widget
createModalWidget
(
)
{
Widget
buildModalWidget
(
BuildContext
context
)
{
return
new
FadeTransition
(
performance:
performance
,
opacity:
new
AnimatedValue
<
double
>(
0.0
,
end:
1.0
,
curve:
Curves
.
easeOut
),
...
...
packages/flutter/lib/src/material/drawer.dart
View file @
78ba7d92
...
...
@@ -109,7 +109,9 @@ class _DrawerRoute extends TransitionRoute {
return
_performance
;
}
List
<
Widget
>
createWidgets
()
=>
[
new
_Drawer
(
route:
this
)
];
List
<
WidgetBuilder
>
get
builders
=>
<
WidgetBuilder
>[
_build
];
Widget
_build
(
BuildContext
context
)
=>
new
_Drawer
(
route:
this
);
void
didPop
([
dynamic
result
])
{
assert
(
result
==
null
);
// because we don't do anything with it, so otherwise it'd be lost
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
78ba7d92
...
...
@@ -138,10 +138,10 @@ class _MenuRoute extends TransitionRoute {
bool
get
opaque
=>
false
;
Duration
get
transitionDuration
=>
_kMenuDuration
;
List
<
Widget
>
createWidgets
()
=>
[
new
ModalBarrier
(),
new
_DropdownMenu
(
route:
this
)
];
Widget
_buildModalBarrier
(
BuildContext
context
)
=>
new
ModalBarrier
();
Widget
_buildDropDownMenu
(
BuildContext
context
)
=>
new
_DropdownMenu
(
route:
this
);
List
<
WidgetBuilder
>
get
builders
=>
<
WidgetBuilder
>[
_buildModalBarrier
,
_buildDropDownMenu
];
void
didPop
([
dynamic
result
])
{
completer
.
complete
(
result
);
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
78ba7d92
...
...
@@ -114,7 +114,7 @@ class _MenuRoute extends ModalRoute {
bool
get
opaque
=>
false
;
Duration
get
transitionDuration
=>
_kMenuDuration
;
Widget
createModalWidget
(
)
=>
new
_PopupMenu
(
route:
this
);
Widget
buildModalWidget
(
BuildContext
context
)
=>
new
_PopupMenu
(
route:
this
);
void
didPop
([
dynamic
result
])
{
completer
.
complete
(
result
);
...
...
packages/flutter/lib/src/widgets/drag_target.dart
View file @
78ba7d92
...
...
@@ -89,13 +89,13 @@ class _DraggableState extends State<Draggable> {
}
);
_avatar
.
update
(
point
);
_avatar
.
reb
uild
(
context
);
_avatar
.
markNeedsB
uild
(
context
);
}
void
_updateDrag
(
PointerInputEvent
event
)
{
if
(
_avatar
!=
null
)
{
_avatar
.
update
(
new
Point
(
event
.
x
,
event
.
y
));
_avatar
.
reb
uild
(
context
);
_avatar
.
markNeedsB
uild
(
context
);
}
}
...
...
@@ -223,12 +223,12 @@ class _DragAvatar {
_activeTargetWillAcceptDrop
=
_activeTarget
!=
null
&&
_activeTarget
.
didEnter
(
data
);
}
void
reb
uild
(
BuildContext
context
)
{
void
markNeedsB
uild
(
BuildContext
context
)
{
if
(
_entry
==
null
)
{
_entry
=
new
OverlayEntry
(
child:
_build
(
context
)
);
_entry
=
new
OverlayEntry
(
builder:
_build
);
Navigator
.
of
(
context
).
overlay
.
insert
(
_entry
);
}
else
{
_entry
.
child
=
_build
(
context
);
_entry
.
markNeedsBuild
(
);
}
}
...
...
packages/flutter/lib/src/widgets/hero_controller.dart
View file @
78ba7d92
...
...
@@ -72,7 +72,7 @@ class HeroController {
void
_addHeroesToOverlay
(
Iterable
<
Widget
>
heroes
,
OverlayState
overlay
)
{
for
(
Widget
hero
in
heroes
)
{
OverlayEntry
entry
=
new
OverlayEntry
(
child:
hero
);
OverlayEntry
entry
=
new
OverlayEntry
(
builder:
(
_
)
=>
hero
);
overlay
.
insert
(
entry
);
_overlayEntries
.
add
(
entry
);
}
...
...
packages/flutter/lib/src/widgets/modal_barrier.dart
View file @
78ba7d92
...
...
@@ -111,15 +111,18 @@ class ModalPosition {
abstract
class
ModalRoute
extends
TransitionRoute
{
ModalPosition
get
position
=>
null
;
Color
get
barrierColor
=>
_kTransparent
;
Widget
createModalWidget
();
List
<
Widget
>
createWidgets
()
{
return
[
new
_AnimatedModalBarrier
(
color:
new
AnimatedColorValue
(
_kTransparent
,
end:
barrierColor
,
curve:
Curves
.
ease
),
performance:
performance
),
new
_ModalScope
(
route:
this
,
child:
createModalWidget
()),
];
Widget
buildModalWidget
(
BuildContext
context
);
Widget
_buildModalBarrier
(
BuildContext
context
)
{
return
new
_AnimatedModalBarrier
(
color:
new
AnimatedColorValue
(
_kTransparent
,
end:
barrierColor
,
curve:
Curves
.
ease
),
performance:
performance
);
}
Widget
_buildModalScope
(
BuildContext
context
)
{
return
new
_ModalScope
(
route:
this
,
child:
buildModalWidget
(
context
));
}
List
<
WidgetBuilder
>
get
builders
=>
<
WidgetBuilder
>[
_buildModalBarrier
,
_buildModalScope
];
}
packages/flutter/lib/src/widgets/overlay.dart
View file @
78ba7d92
...
...
@@ -7,18 +7,11 @@ import 'framework.dart';
class
OverlayEntry
{
OverlayEntry
({
Widget
child
,
this
.
builder
,
bool
opaque:
false
})
:
_
child
=
child
,
_
opaque
=
opaque
;
})
:
_opaque
=
opaque
;
Widget
get
child
=>
_child
;
Widget
_child
;
void
set
child
(
Widget
value
)
{
if
(
_child
==
value
)
return
;
_child
=
value
;
_rebuild
();
}
final
WidgetBuilder
builder
;
bool
get
opaque
=>
_opaque
;
bool
_opaque
;
...
...
@@ -26,7 +19,7 @@ class OverlayEntry {
if
(
_opaque
==
value
)
return
;
_opaque
=
value
;
_reb
uild
();
markNeedsB
uild
();
}
OverlayState
_state
;
...
...
@@ -37,7 +30,8 @@ class OverlayEntry {
_state
=
null
;
}
void
_rebuild
()
{
void
markNeedsBuild
()
{
// TODO(ianh): find a way to make this not rebuild the entire overlay
_state
?.
setState
(()
{});
}
}
...
...
@@ -85,7 +79,7 @@ class OverlayState extends State<Overlay> {
OverlayEntry
entry
=
_entries
[
i
];
backwardsChildren
.
add
(
new
KeyedSubtree
(
key:
new
ObjectKey
(
entry
),
child:
entry
.
child
child:
entry
.
builder
(
context
)
));
if
(
entry
.
opaque
)
break
;
...
...
packages/flutter/lib/src/widgets/page.dart
View file @
78ba7d92
...
...
@@ -105,7 +105,7 @@ class PageRoute extends ModalRoute {
String
get
name
=>
settings
.
name
;
Duration
get
transitionDuration
=>
const
Duration
(
milliseconds:
150
);
Widget
createModalWidget
(
)
=>
new
_Page
(
key:
pageKey
,
route:
this
);
Widget
buildModalWidget
(
BuildContext
context
)
=>
new
_Page
(
key:
pageKey
,
route:
this
);
final
PageStorageBucket
_storageBucket
=
new
PageStorageBucket
();
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
78ba7d92
...
...
@@ -25,15 +25,14 @@ class StateRoute extends Route {
}
class
OverlayRoute
extends
Route
{
List
<
Widget
>
createWidgets
()
=>
const
<
Widget
>[];
List
<
Widget
Builder
>
get
builders
=>
const
<
WidgetBuilder
>[];
List
<
OverlayEntry
>
get
overlayEntries
=>
_overlayEntries
;
final
List
<
OverlayEntry
>
_overlayEntries
=
new
List
<
OverlayEntry
>();
void
didPush
(
OverlayState
overlay
,
OverlayEntry
insertionPoint
)
{
List
<
Widget
>
widgets
=
createWidgets
();
for
(
Widget
widget
in
widgets
)
{
_overlayEntries
.
add
(
new
OverlayEntry
(
child:
widget
));
for
(
WidgetBuilder
builder
in
builders
)
{
_overlayEntries
.
add
(
new
OverlayEntry
(
builder:
builder
));
overlay
?.
insert
(
_overlayEntries
.
last
,
above:
insertionPoint
);
insertionPoint
=
_overlayEntries
.
last
;
}
...
...
packages/unit/test/widget/heroes_test.dart
View file @
78ba7d92
...
...
@@ -4,7 +4,8 @@ import 'package:test/test.dart';
import
'widget_tester.dart'
;
class
TestOverlayRoute
extends
OverlayRoute
{
List
<
Widget
>
createWidgets
()
=>
<
Widget
>[
new
Text
(
'Overlay'
)
];
List
<
WidgetBuilder
>
get
builders
=>
<
WidgetBuilder
>[
_build
];
Widget
_build
(
BuildContext
context
)
=>
new
Text
(
'Overlay'
);
}
bool
_isOnStage
(
Element
element
)
{
...
...
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