Example #1
0
 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);
         }
     }
 }
Example #2
0
        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;
            }
        }
Example #3
0
 void _handleHistoryEntryRemoved()
 {
     this._historyEntry = null;
     this.close();
 }
Example #4
0
 void _handleHistoryEntryRemoved()
 {
     _historyEntry = null;
     close();
 }