flutter_windowmanager
flutter_windowmanager copied to clipboard
Adjust iOS Plugin return code to fail silently
The return type of the FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE)
function is Future<bool>
, which is just bubbling up the value from the method channel. This is great on Android, but on iOS, the method channel returns a string
of the iOS version from boilerplate plugin code. At runtime, if the addFlags
function is invoked in iOS, an exception is thrown because of invalid type coercion.
The obvious workaround is to only invoke the function if Flutter detects Platform.isAndroid
, but this is not intuitive nor represented in documentation.
I suggest modifying the iOS plugin code to invoke the result
function with value false
.