tek_flutter_qrscanner

A flutter plugin for native QRScanner code (Android and iOS)

Set up

Android

Nothing required, you're good to go

iOS

Please contact hoa.ctp@teko.vn to get access token for accessing Teko iOS frameworks.

For detail setup, please see README.md in /example

How to use

Step 1: Create TekFlutterScannerConfig class for define config

class TekFlutterScannerConfig {
  const TekFlutterScannerConfig({
    required this.showAppBar,
    required this.appBarTitle,
    required this.appBarColor,
    required this.description
  });

  final bool showAppBar;
  final String appBarTitle;
  final String appBarColor;
  final String description;
}

You can see more detail in /example/lib/tek_flutter_qrscanner.dart

Step 2: Prepare data and send to native

...
  final _tekFlutterQrscannerPlugin = TekFlutterQrscanner(); // Create plugin instance
...
  var config = const TekFlutterScannerConfig(
      showAppBar: true,
      appBarTitle: "Scan QR",
      appBarColor: "#FBAF17",
      description: "Scan processing"); // create `config` instance to define config for screen
  var result = await _tekFlutterQrscannerPlugin.getScreen(json.encode(config.toMap())); 
  // `config` must be encode to Json String before send to native
  // `result` is a String? which is result of scanning process, if native side click back, `result` will be null