Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust iOS Plugin return code to fail silently #23

Open
alkamike opened this issue Jan 10, 2022 · 0 comments
Open

Adjust iOS Plugin return code to fail silently #23

alkamike opened this issue Jan 10, 2022 · 0 comments

Comments

@alkamike
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant