vin_scanner 0.0.5 copy "vin_scanner: ^0.0.5" to clipboard
vin_scanner: ^0.0.5 copied to clipboard

'A customizable Flutter widget for barcode scanning. Supports orientation lock, resolution presets, overlay styling, and configurable frame processing rate.'

example/lib/vin_scanner.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:vin_scanner/vin_scanner.dart';

/// The main entry point of the application.
void main() => runApp(const MyApp());

/// Root widget of the app.
class MyApp extends StatelessWidget {
  /// Creates the main app widget.
  const MyApp({super.key});

  /// Builds the MaterialApp widget and sets up the barcode scanner screen.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: BarcodeScannerScreen(
        /// Callback invoked when a barcode is detected.
        onBarcodeDetected: (code, type) {
          debugPrint('Detected barcode: $code');
          debugPrint('Detected barcode type: $type');
        },

        /// Locks the device orientation to portrait mode.
        orientationLock: DeviceOrientation.portraitUp,
      ),
    );
  }
}
3
likes
160
points
46
downloads

Publisher

verified publisherflutterdevs.com

Weekly Downloads

'A customizable Flutter widget for barcode scanning. Supports orientation lock, resolution presets, overlay styling, and configurable frame processing rate.'

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT-0 (license)

Dependencies

camera, flutter, google_mlkit_barcode_scanning, permission_handler

More

Packages that depend on vin_scanner