requestImageRef method

Future<RequestImageRefResult?> requestImageRef()

Requests the URL of the image last touched by the user.

NOTE: On iOS, it is implemented using JavaScript.

Supported Platforms/Implementations:

Implementation

Future<RequestImageRefResult?> requestImageRef() async {
  Map<String, dynamic> args = <String, dynamic>{};
  Map<dynamic, dynamic>? result =
      await _channel.invokeMethod('requestImageRef', args);
  return result != null
      ? RequestImageRefResult(
          url: result['url'] != null ? Uri.tryParse(result['url']) : null,
        )
      : null;
}