flutter_barcode_reader/lib/barcode_scan.dart

12 lines
377 B
Dart
Raw Normal View History

2017-10-30 01:05:11 +08:00
import 'dart:async';
import 'package:flutter/services.dart';
class BarcodeScanner {
static const CameraAccessDenied = 'PERMISSION_NOT_GRANTED';
static const UserCanceled = 'USER_CANCELED';
2017-10-30 01:05:11 +08:00
static const MethodChannel _channel =
const MethodChannel('com.apptreesoftware.barcode_scan');
static Future<String> scan() async => await _channel.invokeMethod('scan');
}