MobileScannerPlatform class abstract

The platform interface for the mobile_scanner plugin.

Inheritance
  • Object
  • PlatformInterface
  • MobileScannerPlatform

Constructors

MobileScannerPlatform()
Constructs a MobileScannerPlatform.

Properties

activeWebReader → WebBarcodeReader?
The barcode reader that is currently active on web, or null when no scanner is running or the platform is not web.
no setter
barcodesStream → Stream<BarcodeCapture?>
Get the stream of barcode captures.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
torchStateStream → Stream<TorchState>
Get the stream of torch state changes.
no setter
zoomScaleStateStream → Stream<double>
Get the stream of zoom scale changes.
no setter

Methods

analyzeImage(String path, {List<BarcodeFormat> formats = const <BarcodeFormat>[]}) → Future<BarcodeCapture?>
Analyze a local image file for barcodes.
buildCameraView() → Widget
Build the camera view for the barcode scanner.
dispose() → Future<void>
Dispose of this MobileScannerPlatform instance.
getBestCloseRangeScanningLens({CameraFacing facing = CameraFacing.back}) → Future<CameraLensType?>
Determine the lens type best suited for close-range scanning.
getSupportedLenses({CameraFacing? facing}) → Future<Set<CameraLensType>>
Get the set of supported camera lens types for the current device.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → Future<void>
Pause the camera.
resetZoomScale() → Future<void>
Reset the zoom scale, so that the camera is fully zoomed out.
setBarcodeLibraryScriptUrl(String scriptUrl) → void
Set the source url for the barcode library.
setFocusPoint(Offset position) → Future<void>
Set the focus position for the camera.
setWebBarcodeReader(WebBarcodeReader reader) → void
Set the preferred barcode detection backend for the web platform.
setZoomScale(double zoomScale) → Future<void>
Set the zoom scale of the camera.
start(StartOptions startOptions) → Future<MobileScannerViewAttributes>
Start the barcode scanner and prepare a scanner view.
stop() → Future<void>
Stop the camera.
toggleTorch() → Future<void>
Toggle the torch on the active camera on or off.
toString() → String
A string representation of this object.
inherited
updateScanWindow(Rect? window) → Future<void>
Update the scan window to the given window rectangle.

Operators

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

Static Properties

instance ↔ MobileScannerPlatform
The default instance of MobileScannerPlatform to use.
getter/setter pair