extractXMPFrom static method

Future<Map<String, dynamic>> extractXMPFrom({
  1. required String url,
  2. UrlType type = UrlType.remote,
})

Returns a Map with the extracted XMP data and Image data from a given URL. The data extraction is made on the native side.

Obs: Currently supports only UrlType.remote.

Implementation

static Future<Map<String, dynamic>> extractXMPFrom(
    {required String url, UrlType type = UrlType.remote}) async {
  try {
    if (type == UrlType.remote) {
      final xmpData = await _channel.invokeMethod("extractXmpFromRemote", {
        "url": url
      });

      return Map<String, dynamic>.from(xmpData);
    }

    throw UnimplementedError();
  } catch (e, stack) {
    print(e);
    print(stack);

    throw (e);
  }
}