qrscan library
One-shot Flutter QR / barcode plugin.
Open the camera, decode the first code, return a String, close.
Not an embedded preview widget — use mobile_scanner for that.
Constants
- CameraAccessDenied → const String
- Returned when the host denies camera access.
- CameraInUse → const String
- Another app already holds the camera.
- CameraStartFailed → const String
- Camera bind failed (no back camera, driver error).
- NoActivity → const String
- Plugin has no Activity / cannot present the scanner.
Functions
-
generateBarCode(
String code) → Future< Uint8List> - Generate a QR code PNG as bytes. Name is historical — this is QR only.
-
scan(
{Color? color, String? hint, ScanLooks? looks}) → Future< String?> -
Open the camera scanner and return the decoded string, or
nullif cancelled. -
scanBytes(
Uint8List uint8list) → Future< String?> - Decode a barcode / QR code from image bytes.
-
scanPath(
String path) → Future< String?> - Decode a barcode / QR code from a local file path.
-
scanPhoto(
) → Future< String?> - Pick an image from the gallery and decode a barcode / QR code.