From 56b18e4829a1f5d4c481aeb9ee8053ed4cbfc9ff Mon Sep 17 00:00:00 2001 From: Giulia Testa Date: Fri, 16 Dec 2022 12:55:28 +0100 Subject: [PATCH] assert cutOutSize (must be [0,1]) --- lib/src/ui/dynamic_scanner_overlay.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/ui/dynamic_scanner_overlay.dart b/lib/src/ui/dynamic_scanner_overlay.dart index f3cb117..13db456 100644 --- a/lib/src/ui/dynamic_scanner_overlay.dart +++ b/lib/src/ui/dynamic_scanner_overlay.dart @@ -11,7 +11,8 @@ class DynamicScannerOverlay extends ScannerOverlay { super.borderRadius, super.borderLength, this.cutOutSize = 0.5 - }); + }) : assert(cutOutSize >= 0 && cutOutSize <= 1, + 'The cut out size must be between 0 and 1'); @override final double cutOutSize;