add scanfield

main
Julian Gegner 2023-03-06 15:22:02 +01:00
parent 3ea43d019b
commit a99fed7fa2
1 changed files with 14 additions and 2 deletions

View File

@ -59,12 +59,24 @@ class MyScanner extends StatelessWidget {
return settingsProvider.scanning
? Expanded(
child: MobileScanner(
child: Stack(
alignment: Alignment.center,
children: [
MobileScanner(
fit: BoxFit.contain,
controller: MobileScannerController(
detectionTimeoutMs: 2000,
),
onDetect: onDetect))
onDetect: onDetect,
),
ClipRRect(
borderRadius: BorderRadius.circular(20),
child: Container(
height: MediaQuery.of(context).size.height / 3,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.white.withOpacity(0.4))),
],
))
: RoundButton(
onPressed: () => settingsProvider.scanning = true,
iconData: Icons.qr_code_scanner_outlined,