allowWindowClosure static method

Future<void> allowWindowClosure()

Allows the window to be closed by the user.

Requires the window delegate to be enabled.

Implementation

static Future<void> allowWindowClosure() async {
  await _completer.future;
  final hasSucceeded = await _windowManipulatorMethodChannel
      .invokeMethod('allowWindowClosure');

  assert(
      hasSucceeded,
      'allowWindowClosure failed. Please make sure that '
      'the `enableWindowDelegate` parameter is set to true in your '
      'WindowManipulator.initialize call.');
}