requestImageRef method
Requests the URL of the image last touched by the user.
NOTE: On iOS, it is implemented using JavaScript.
Supported Platforms/Implementations:
- Android native WebView (Official API - WebView.requestImageRef).
- iOS.
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;
}