AVX Scanner Plugin

QR code scanner with native UI and authentication for Flutter Android apps.

Requirements

  • Flutter 3.3.0+
  • Android minSdkVersion 34
  • Java 17

Installation

Add to your pubspec.yaml:

dependencies:
  avx_scanner_plugin:
    git:
      url: <repository-url>
      ref: v1.0.0

Then run:

flutter pub get

Setup

Ensure your android/app/build.gradle has:

android {
    compileSdkVersion 36

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    defaultConfig {
        minSdkVersion 34
    }
}

No additional permissions or manifest entries needed — the plugin handles everything.

Usage

import 'package:avx_scanner_plugin/avx_scanner_plugin.dart';

// Launch the scanner from any button or action:
ElevatedButton(
  onPressed: () async {
    await AvxScannerPlugin.instance.showScannerScreen(
      apiUrl: 'https://your-api-endpoint.com/v1/authenticate',
    );
  },
  child: Text('Scan QR Code'),
)

That's it. The scanner handles:

  • Camera preview with bounding box overlay
  • QR code detection and tracking
  • Auto-capture when quality conditions are met
  • API call to authenticate the scanned QR code
  • Results display with authentication status
  • Returns to your app when complete

API

AvxScannerPlugin.instance.showScannerScreen({required String apiUrl})

Opens a full-screen native scanner. The apiUrl parameter is the endpoint where captured QR data is sent for authentication.

AvxScannerPlugin.instance.getPlatformVersion()

Returns the Android version string (diagnostic).

Libraries

avx_scanner_plugin