Navaron Bracke

format barcode reader base

... ... @@ -42,7 +42,8 @@ abstract class BarcodeReader {
final Completer<void> completer = Completer();
final HTMLScriptElement script = (document.createElement('script') as HTMLScriptElement)
final HTMLScriptElement script =
(document.createElement('script') as HTMLScriptElement)
..id = scriptId
..async = true
..defer = false
... ... @@ -65,7 +66,8 @@ abstract class BarcodeReader {
const MobileScannerException(
errorCode: MobileScannerErrorCode.genericError,
errorDetails: MobileScannerErrorDetails(
message: 'Could not load the BarcodeReader script due to a network error.',
message:
'Could not load the BarcodeReader script due to a network error.',
),
),
);
... ... @@ -81,7 +83,10 @@ abstract class BarcodeReader {
///
/// The [options] are used to configure the barcode reader.
/// The [containerElement] will become the parent of the video output element.
Future<void> start(StartOptions options, {required HTMLElement containerElement}) {
Future<void> start(
StartOptions options, {
required HTMLElement containerElement,
}) {
throw UnimplementedError('start() has not been implemented.');
}
... ...