laoocr 0.0.9 copy "laoocr: ^0.0.9" to clipboard
laoocr: ^0.0.9 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');
      },
    );
  }
}
14
likes
140
pub points
6%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

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