INNER CODE UNIT · Dart

FlutterBarcodeScanner

AmolGangadhare/flutter_barcode_scanner · lib/flutter_barcode_scanner.dart:12

class FlutterBarcodeScanner {
  static const MethodChannel _channel =
      MethodChannel('flutter_barcode_scanner');

  static const EventChannel _eventChannel =
      EventChannel('flutter_barcode_scanner_receiver');

  static Stream? _onBarcodeReceiver;

  /// Scan with the camera until a barcode is identified, then return.
  ///
  /// Shows a scan line with [lineColor] over a scan window. A flash icon is
  /// displayed if [isShowFlashIcon] is true. The text of the cancel button can
  /// be customized with the [cancelButtonText] string.
  static Future<String> scanBarcode(String lineColor, String cancelButtonText,
      bool isShowFlashIcon, ScanMode scanMode) async {
    if (cancelButtonText.isEmpty) {
      cancelButtonText = 'Cancel';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…