Navaron Bracke

use the JSMap name to make dropping this type easier in the future

... ... @@ -10,11 +10,11 @@ import 'dart:js_interop';
/// Object literals can be made using [jsify].
@JS('Map')
@staticInterop
class JsMap<K extends JSAny, V extends JSAny> implements JSAny {
external factory JsMap();
class JSMap<K extends JSAny, V extends JSAny> {
external factory JSMap();
}
extension JsMapExtension<K extends JSAny, V extends JSAny> on JsMap<K, V> {
extension JSMapExtension<K extends JSAny, V extends JSAny> on JSMap<K, V> {
external V? get(K key);
external JSVoid set(K key, V? value);
}
... ...
... ... @@ -85,12 +85,12 @@ final class ZXingBarcodeReader extends BarcodeReader {
}
}
JsMap? _createReaderHints(List<BarcodeFormat> formats) {
JSMap? _createReaderHints(List<BarcodeFormat> formats) {
if (formats.isEmpty || formats.contains(BarcodeFormat.all)) {
return null;
}
final JsMap hints = JsMap();
final JSMap hints = JSMap();
// Set the formats hint.
// See https://github.com/zxing-js/library/blob/master/src/core/DecodeHintType.ts#L45
... ...
... ... @@ -16,7 +16,7 @@ class ZXingBrowserMultiFormatReader {
///
/// See also: https://github.com/zxing-js/library/blob/master/src/core/DecodeHintType.ts
external factory ZXingBrowserMultiFormatReader(
JsMap? hints,
JSMap? hints,
JSNumber? timeBetweenScansMillis,
);
}
... ...