Search packages, repositories and app categories

GitHub repositoryjigyasa1411/flutter_nanonets_ocr

flutter_nanonets_ocr

jigyasa1411/flutter_nanonets_ocr open-source repository details.

flutter_nanonets_ocr project cover
Stars
2
Forks
0
Last push (UTC)
Apr 4, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

Description

Nanonets provides an OCR service where we can create models, train them and use them for OCR predictions. This package is developed to make usage of Nanonets OCR api directly without having to write manual code for integrating it in your application.

Follow this blog for step by step integration of Nanonets OCR model in a Flutter application: Implementing Nanonets OCR in Flutter

Get started

Add dependency You can use the command to add flutter_nanonets_ocr as a dependency with the latest stable version:

   $ dart pub add flutter_nanonets_ocr

Or you can manually add flutter_nanonets_ocr into the dependencies section in your pubspec.yaml:

  dependencies:
      flutter_nanonets_ocr: ^0.0.14

Example

Fetching details using document file
 import 'package:flutter_nanonets_ocr/flutter_nanonets_ocr.dart';
  
 String apiKey = "INSERT NANONETS API KEY";

 NanonetsOCR nanonetsOCR = NanonetsOCR();

 FutureBuilder(
            future: nanonetsOCR.predictDocumentFile(apiKey, docImage,
                    "INSERT OCR MODEL ID HERE", context),
            builder: (context, snapshot) {
              if (snapshot.connectionState == ConnectionState.active) {
                return loadingWidget();
              } else if (snapshot.connectionState == ConnectionState.done) {
                return yourSuccessWidget();
              } else {
                return loadingWidget();
              }
            });


Fetching details using document url
 import 'package:flutter_nanonets_ocr/flutter_nanonets_ocr.dart';
  
 String apiKey = "INSERT NANONETS API KEY";

 NanonetsOCR nanonetsOCR = NanonetsOCR();

 FutureBuilder(
            future: nanonetsOCR.predictDocumentURL(apiKey, docImageUrl,
                    "INSERT OCR MODEL ID HERE", context),
            builder: (context, snapshot) {
              if (snapshot.connectionState == ConnectionState.active) {
                return loadingWidget();
              } else if (snapshot.connectionState == ConnectionState.done) {
                return yourSuccessWidget();
              } else {
                return loadingWidget();
              }
            });


jigyasa1411 GitHub avatar
GitHub author

jigyasa1411 ↗

LanguagesObjective-CMakefileDartC++CMakeCRubySwiftHTMLShellJavaKotlin

Packages published by this repository

Dependencies used

Dependency list 4 items

  • flutter{"sdk":"flutter"}
  • dio^5.4.2
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^2.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗