requestImageRef method
Requests the URL of the image last touched by the user.
NOTE: On iOS, it is implemented using JavaScript.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebView.requestImageRef)
- iOS
Implementation
@override
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 ? WebUri(result['url']) : null,
)
: null;
}