Pārlūkot izejas kodu

Сode formatting

flutter-beta
Tihomirov pirms 4 gadiem
vecāks
revīzija
fe4a11bbb8
1 mainītis faili ar 8 papildinājumiem un 6 dzēšanām
  1. +8
    -6
      lib/src/qr_scanner_overlay_shape.dart

+ 8
- 6
lib/src/qr_scanner_overlay_shape.dart Parādīt failu

@@ -14,15 +14,17 @@ class QrScannerOverlayShape extends ShapeBorder {
double? cutOutWidth,
double? cutOutHeight,
this.cutOutBottomOffset = 0,
}): cutOutWidth = cutOutWidth ?? cutOutSize ?? 250,
cutOutHeight = cutOutHeight ?? cutOutSize ?? 250 {
}) : cutOutWidth = cutOutWidth ?? cutOutSize ?? 250,
cutOutHeight = cutOutHeight ?? cutOutSize ?? 250 {
assert(
borderLength <= min(this.cutOutWidth, this.cutOutHeight) / 2 + borderWidth * 2,
borderLength <=
min(this.cutOutWidth, this.cutOutHeight) / 2 + borderWidth * 2,
"Border can't be larger than ${min(this.cutOutWidth, this.cutOutHeight) / 2 + borderWidth * 2}",
);
assert((cutOutSize != null && cutOutWidth == null && cutOutHeight == null) || (cutOutSize == null && cutOutWidth != null && cutOutHeight != null),
'Use only cutOutWidth and cutOutHeight or only cutOutSize'
);
assert(
(cutOutSize != null && cutOutWidth == null && cutOutHeight == null) ||
(cutOutSize == null && cutOutWidth != null && cutOutHeight != null),
'Use only cutOutWidth and cutOutHeight or only cutOutSize');
}

final Color borderColor;


Notiek ielāde…
Atcelt
Saglabāt