Commit 32c404eb authored by nightfallsad's avatar nightfallsad

Revert "fix hero controller"

This reverts commit 678a1a37.
parent 7ead767f
...@@ -69,6 +69,7 @@ class ContainerManagerState extends State<BoostContainerManager> { ...@@ -69,6 +69,7 @@ class ContainerManagerState extends State<BoostContainerManager> {
final List<BoostContainer> _offstage = <BoostContainer>[]; final List<BoostContainer> _offstage = <BoostContainer>[];
List<_ContainerOverlayEntry> _leastEntries; List<_ContainerOverlayEntry> _leastEntries;
BoostContainer _onstage; BoostContainer _onstage;
bool _foreground = true; bool _foreground = true;
...@@ -157,20 +158,15 @@ class ContainerManagerState extends State<BoostContainerManager> { ...@@ -157,20 +158,15 @@ class ContainerManagerState extends State<BoostContainerManager> {
} }
} }
final List<Widget> containers = <Widget>[]; final List<BoostContainer> containers = <BoostContainer>[];
containers.addAll(_offstage.map<Widget>( containers.addAll(_offstage);
(BoostContainer container) => HeroControllerScope(
controller: null,
child: container
)
));
assert(_onstage != null, 'Should have a least one BoostContainer'); assert(_onstage != null, 'Should have a least one BoostContainer');
containers.add(_onstage); containers.add(_onstage);
_leastEntries = containers _leastEntries = containers
.map<_ContainerOverlayEntry>( .map<_ContainerOverlayEntry>(
(Widget container) => _ContainerOverlayEntry(container)) (BoostContainer container) => _ContainerOverlayEntry(container))
.toList(growable: false); .toList(growable: false);
overlayState.insertAll(_leastEntries); overlayState.insertAll(_leastEntries);
...@@ -340,7 +336,7 @@ class ContainerManagerState extends State<BoostContainerManager> { ...@@ -340,7 +336,7 @@ class ContainerManagerState extends State<BoostContainerManager> {
} }
class _ContainerOverlayEntry extends OverlayEntry { class _ContainerOverlayEntry extends OverlayEntry {
_ContainerOverlayEntry(Widget container) _ContainerOverlayEntry(BoostContainer container)
: super( : super(
builder: (BuildContext ctx) => container, builder: (BuildContext ctx) => container,
opaque: true, opaque: true,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment