closeWindow static method

Future<void> closeWindow()

Sends a message to close the window hosting your Flutter app.

Implementation

static Future<void> closeWindow() async {
  if (kIsWeb) throw Exception('The method does not work in Flutter Web.');
  await _initIfRequired();
  await _channel.invokeMethod('closeWindow');
}