showSingleBarcodeScanner function

Future<String?> showSingleBarcodeScanner(
  1. BuildContext context
)

Implementation

Future<String?> showSingleBarcodeScanner(BuildContext context) async {
  return showModalBottomSheet<String>(
    context: context,
    showDragHandle: false,
    backgroundColor: Colors.black,
    builder: (BuildContext context) {
      return SizedBox(
        width: double.infinity,
        height: MediaQuery.heightOf(context) * 0.4,
        child: const _BarcodeScannerView(),
      );
    },
  );
}