getImage method

Future<Uint8List?> getImage(
  1. String key
)

Implementation

Future<Uint8List?> getImage(String key) async {
  final res = await promiseToFutureAsMap(
    jsInvokeMethod("getImage", key, null),
  );

  if (res == null) throw Exception("no data received from js");

  if (res["error"] != null) throw Exception(res["error"]);

  return res["result"];
}