install method
- @override
override
Called when the route is inserted into the navigator.
Use this to populate overlayEntries and add them to the overlay
(accessible as Navigator.overlay
). (The reason the Route is
responsible for doing this, rather than the Navigator, is that the
Route will be responsible for removing the entries and this way it's
symmetric.)
The insertionPoint
argument will be null if this is the first route
inserted. Otherwise, it indicates the overlay entry to place immediately
below the first overlay for this route.
Implementation
@override
void install(OverlayEntry insertionPoint) {
assert(!_transitionCompleter.isCompleted, 'Cannot install a $runtimeType after disposing it.');
_controller = createAnimationController();
assert(_controller != null, '$runtimeType.createAnimationController() returned null.');
_animation = createAnimation();
assert(_animation != null, '$runtimeType.createAnimation() returned null.');
super.install(insertionPoint);
}