OptionalMethodCall extension

Calls on a platform view's channel for methods that not every platform implements.

on

Methods

invokeOptionalMethod(String method, [Object? arguments]) → Future<void>

Available on MethodChannel, provided by the OptionalMethodCall extension

Calls method and treats a missing native implementation as "not supported on this platform" rather than as an error.