Skip to content

Adjust iOS Plugin return code to fail silently #23

Open
@alkamike

Description

@alkamike

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions