laoocr 0.1.0 copy "laoocr: ^0.1.0" to clipboard
laoocr: ^0.1.0 copied to clipboard

Lao OCR Scanner (Lao ID Card, Passport, etc...) and Face Liveliness.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:laoocr/laoocr.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return LaoOCRScan(
      onCapture: (res) {
        // print('OCR result = $res');
        // print('OCR img = ${res['kycImg']}'); //Uint8List
      },
      showPopBack: true,
      doFaceReg: true,
      onFaceReg: (data) {
        //liveliness status is Passed means real people, Fail means fake person
        // print('liveliness data = $data'); //image as base 64
      },
      showRetakeBtn: true,
      showSubmitBtn: true,
      showFaceSubmitBtn: true,
      txtSubmit: 'Submit',
      btnSubmit: () {
        // print('submitt');
      },
      txtSubmitOnFace: 'Done',
      btnSubmitOnFace: () {
        // print('face liveliness submit');
      },
    );
  }
}
18
likes
130
points
72
downloads

Publisher

unverified uploader

Weekly Downloads

Lao OCR Scanner (Lao ID Card, Passport, etc...) and Face Liveliness.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

camera, dotted_border, flutter, flutter_face_api, google_ml_kit, image, path, path_provider

More

Packages that depend on laoocr