MethodChannelBarcodeScannerPlugin class

Lớp triển khai giao tiếp thực tế với Native bằng MethodChannel và EventChannel.

Inheritance

Properties

barcodeStream Stream<String>
Stream phát ra mã vạch khi máy quét phần cứng (PDA) quét thành công. Sử dụng EventChannel để lắng nghe Broadcast Intents từ hệ thống. Dùng với StreamBuilder hoặc listen() để nhận dữ liệu real-time.
no setteroverride
eventChannel EventChannel
Channel dùng để lắng nghe luồng dữ liệu (Stream)
final
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
Channel dùng để gửi lệnh (Call/Response)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startCameraScan() Future<String?>
Mở màn hình camera và quét mã vạch sử dụng CameraX + Google ML Kit. Trả về mã vạch nếu quét thành công, hoặc null nếu người dùng hủy. Phù hợp với điện thoại thông minh không có máy quét phần cứng chuyên dụng.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited