use the JSMap name to make dropping this type easier in the future
Showing
3 changed files
with
6 additions
and
6 deletions
| @@ -10,11 +10,11 @@ import 'dart:js_interop'; | @@ -10,11 +10,11 @@ import 'dart:js_interop'; | ||
| 10 | /// Object literals can be made using [jsify]. | 10 | /// Object literals can be made using [jsify]. |
| 11 | @JS('Map') | 11 | @JS('Map') |
| 12 | @staticInterop | 12 | @staticInterop |
| 13 | -class JsMap<K extends JSAny, V extends JSAny> implements JSAny { | ||
| 14 | - external factory JsMap(); | 13 | +class JSMap<K extends JSAny, V extends JSAny> { |
| 14 | + external factory JSMap(); | ||
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | -extension JsMapExtension<K extends JSAny, V extends JSAny> on JsMap<K, V> { | 17 | +extension JSMapExtension<K extends JSAny, V extends JSAny> on JSMap<K, V> { |
| 18 | external V? get(K key); | 18 | external V? get(K key); |
| 19 | external JSVoid set(K key, V? value); | 19 | external JSVoid set(K key, V? value); |
| 20 | } | 20 | } |
| @@ -85,12 +85,12 @@ final class ZXingBarcodeReader extends BarcodeReader { | @@ -85,12 +85,12 @@ final class ZXingBarcodeReader extends BarcodeReader { | ||
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | - JsMap? _createReaderHints(List<BarcodeFormat> formats) { | 88 | + JSMap? _createReaderHints(List<BarcodeFormat> formats) { |
| 89 | if (formats.isEmpty || formats.contains(BarcodeFormat.all)) { | 89 | if (formats.isEmpty || formats.contains(BarcodeFormat.all)) { |
| 90 | return null; | 90 | return null; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | - final JsMap hints = JsMap(); | 93 | + final JSMap hints = JSMap(); |
| 94 | 94 | ||
| 95 | // Set the formats hint. | 95 | // Set the formats hint. |
| 96 | // See https://github.com/zxing-js/library/blob/master/src/core/DecodeHintType.ts#L45 | 96 | // See https://github.com/zxing-js/library/blob/master/src/core/DecodeHintType.ts#L45 |
| @@ -16,7 +16,7 @@ class ZXingBrowserMultiFormatReader { | @@ -16,7 +16,7 @@ class ZXingBrowserMultiFormatReader { | ||
| 16 | /// | 16 | /// |
| 17 | /// See also: https://github.com/zxing-js/library/blob/master/src/core/DecodeHintType.ts | 17 | /// See also: https://github.com/zxing-js/library/blob/master/src/core/DecodeHintType.ts |
| 18 | external factory ZXingBrowserMultiFormatReader( | 18 | external factory ZXingBrowserMultiFormatReader( |
| 19 | - JsMap? hints, | 19 | + JSMap? hints, |
| 20 | JSNumber? timeBetweenScansMillis, | 20 | JSNumber? timeBetweenScansMillis, |
| 21 | ); | 21 | ); |
| 22 | } | 22 | } |
-
Please register or login to post a comment