import dart:html throws error when build on android emulator, but I need html

Issue My flutter app uses a maps API key as below. create_script_element.dart import ‘dart:html’; import ‘current_flavour.dart’; void createScriptElement() { ScriptElement script = ScriptElement(); script.src = "https://maps.googleapis.com/maps/api/js?key=${currentFlavor()}&language=en&libraries=drawing&callback=Function.prototype"; script.id = "super-script"; document.head?.append(script); } Another file ‘current_flavour.dart’ has the keys const String flavorDev

Continue reading

IndexedDB: `DOMException` while opening an `IDBObjectStore`, that the transaction has finished

Issue When trying to open IDBObjectStore(ObjectStore in dart): Error message (exact copy-paste) [+5324 ms] DOMException: Failed to execute ‘objectStore’ on ‘IDBTransaction’: The transaction has finished. dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart 1233:22 objectStore] packages/scholar/scholar/client/flutter/dart/src/main.dart 21:35 <fn> dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14 _checkAndCall dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39 dcall dart-sdk/lib/html/dart2js/html_dart2js.dart 37317:58 <fn>

Continue reading