Navaron Bracke

make the barcode reader getters throw if not implemented

@@ -14,10 +14,14 @@ abstract class BarcodeReader { @@ -14,10 +14,14 @@ abstract class BarcodeReader {
14 const BarcodeReader(); 14 const BarcodeReader();
15 15
16 /// Whether the scanner is currently scanning for barcodes. 16 /// Whether the scanner is currently scanning for barcodes.
17 - bool get isScanning; 17 + bool get isScanning {
  18 + throw UnimplementedError('isScanning has not been implemented.');
  19 + }
18 20
19 /// Get the size of the output of the video stream. 21 /// Get the size of the output of the video stream.
20 - Size get videoSize; 22 + Size get videoSize {
  23 + throw UnimplementedError('videoSize has not been implemented.');
  24 + }
21 25
22 /// The id for the script tag that loads the barcode library. 26 /// The id for the script tag that loads the barcode library.
23 /// 27 ///
@@ -26,7 +30,9 @@ abstract class BarcodeReader { @@ -26,7 +30,9 @@ abstract class BarcodeReader {
26 String get scriptId => 'mobile-scanner-barcode-reader'; 30 String get scriptId => 'mobile-scanner-barcode-reader';
27 31
28 /// The script url for the barcode library. 32 /// The script url for the barcode library.
29 - String get scriptUrl; 33 + String get scriptUrl {
  34 + throw UnimplementedError('scriptUrl has not been implemented.');
  35 + }
30 36
31 /// Start detecting barcodes. 37 /// Start detecting barcodes.
32 /// 38 ///