Julian Steenbakker

imp: change parameters

... ... @@ -19,6 +19,8 @@ Improvements:
* Removed `called stop while already stopped` messages.
Features:
* You can now provide a `scanWindow` to the `MobileScanner()` widget.
* You can now draw an overlay over the scanned barcode. See the barcode scanner window in the example app for more information.
* Added a new `placeholderBuilder` function to the `MobileScanner` widget to customize the preview placeholder.
* Added `autoStart` parameter to MobileScannerController(). If set to false, controller won't start automatically.
* Added `hasTorch` function on MobileScannerController(). After starting the controller, you can check if the device has a torch.
... ...
... ... @@ -54,11 +54,10 @@ class _BarcodeScannerWithScanWindowState
arguments != null)
CustomPaint(
painter: BarcodeOverlay(
barcode!,
arguments!,
BoxFit.contain,
MediaQuery.of(context).devicePixelRatio,
capture!,
barcode: barcode!,
arguments: arguments!,
boxFit: BoxFit.contain,
capture: capture!,
),
),
CustomPaint(
... ... @@ -131,19 +130,17 @@ class ScannerOverlay extends CustomPainter {
}
class BarcodeOverlay extends CustomPainter {
BarcodeOverlay(
this.barcode,
this.arguments,
this.boxFit,
this.devicePixelRatio,
this.capture,
);
BarcodeOverlay({
required this.barcode,
required this.arguments,
required this.boxFit,
required this.capture,
});
final BarcodeCapture capture;
final Barcode barcode;
final MobileScannerArguments arguments;
final BoxFit boxFit;
final double devicePixelRatio;
@override
void paint(Canvas canvas, Size size) {
... ...
... ... @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'mobile_scanner'
s.version = '0.0.1'
s.version = '3.0.0'
s.summary = 'An universal scanner for Flutter based on MLKit.'
s.description = <<-DESC
An universal scanner for Flutter based on MLKit.
... ...