Przeglądaj źródła

Add padding property to customize overlay shape position

flutter-beta
Pedro Belfort 6 lat temu
rodzic
commit
93aa240cb2
1 zmienionych plików z 3 dodań i 0 usunięć
  1. +3
    -0
      lib/src/qr_code_scanner.dart

+ 3
- 0
lib/src/qr_code_scanner.dart Wyświetl plik

@@ -11,6 +11,7 @@ class QRView extends StatefulWidget {
@required Key key,
@required this.onQRViewCreated,
this.overlay,
this.overlayMargin = EdgeInsets.zero,
}) : assert(key != null),
assert(onQRViewCreated != null),
super(key: key);
@@ -18,6 +19,7 @@ class QRView extends StatefulWidget {
final QRViewCreatedCallback onQRViewCreated;

final ShapeBorder overlay;
final EdgeInsetsGeometry overlayMargin;

@override
State<StatefulWidget> createState() => _QRViewState();
@@ -31,6 +33,7 @@ class _QRViewState extends State<QRView> {
_getPlatformQrView(),
if (widget.overlay != null)
Container(
padding: widget.overlayMargin,
decoration: ShapeDecoration(
shape: widget.overlay,
),


Ładowanie…
Anuluj
Zapisz