setWebReturnValue static method
Sets a return value when the current window or tab is being closed when your app is running in Flutter Web.
Implementation
static Future<void> setWebReturnValue(String? returnValue) async {
if (!kIsWeb) throw Exception('The method only works in Flutter Web.');
await _channel.invokeMethod('setWebReturnValue', returnValue);
}