| # whenClosed property | |
| Future<void> whenClosed | |
| _<span class="feature">inherited</span>_ | |
| <p>A future that completes when the interface is closed.</p> | |
| ## Implementation | |
| ```dart | |
| Future<void> get whenClosed { | |
| if (_currentState == InterfaceState.closed) { | |
| return Future.value(); | |
| } | |
| return stateChanges.firstWhere((s) => s == InterfaceState.closed); | |
| } | |
| ``` | |