flutter_ocr_sdk 1.1.3 copy "flutter_ocr_sdk: ^1.1.3" to clipboard
flutter_ocr_sdk: ^1.1.3 copied to clipboard

discontinued

A wrapper for Dynamsoft OCR SDK, detecting MRZ in passports, travel documents, and ID cards.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_ocr_sdk_example/tab_page.dart';
import 'dart:async';
import 'package:shared_preferences/shared_preferences.dart';
import 'global.dart';

Future<void> main() async {
  runApp(const MyApp());
}

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

  Future<SharedPreferences> loadData() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    await initMRZSDK();
    return prefs;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Dynamsoft MRZ Detection',
      theme: ThemeData(
        scaffoldBackgroundColor: Color(0xff1D1B20),
      ),
      home: FutureBuilder<SharedPreferences>(
        future: loadData(),
        builder:
            (BuildContext context, AsyncSnapshot<SharedPreferences> snapshot) {
          if (!snapshot.hasData) {
            return const CircularProgressIndicator(); // Loading indicator
          }
          Future.microtask(() {
            Navigator.pushReplacement(
                context, MaterialPageRoute(builder: (context) => TabPage()));
          });
          return Container();
        },
      ),
    );
  }
}
19
likes
0
pub points
78%
popularity

Publisher

verified publisheryushulx.me

A wrapper for Dynamsoft OCR SDK, detecting MRZ in passports, travel documents, and ID cards.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, js, path, path_provider, plugin_platform_interface

More

Packages that depend on flutter_ocr_sdk