void _ensureHistoryEntry() { if (this._historyEntry == null) { ModalRoute route = ModalRoute.of(this.context); if (route != null) { this._historyEntry = new LocalHistoryEntry(onRemove: this._handleHistoryEntryRemoved); route.addLocalHistoryEntry(this._historyEntry); FocusScope.of(this.context).setFirstFocus(this._focusScopeNode); } } }
void _animationStatusChanged(AnimationStatus status) { switch (status) { case AnimationStatus.forward: this._ensureHistoryEntry(); break; case AnimationStatus.reverse: this._historyEntry?.remove(); this._historyEntry = null; break; case AnimationStatus.dismissed: break; case AnimationStatus.completed: break; } }
void _handleHistoryEntryRemoved() { this._historyEntry = null; this.close(); }
void _handleHistoryEntryRemoved() { _historyEntry = null; close(); }