addToCache method
Implementation
Future<void> addToCache(String key, Uint8List imageBytes) async {
final res = await promiseToFutureAsMap(
jsInvokeMethod("addToCache", imageBytes, key),
);
if (res == null) throw Exception("no data received from js");
if (res["error"] != null) throw Exception(res["error"]);
}