guardlinesdk 0.1.9 copy "guardlinesdk: ^0.1.9" to clipboard
guardlinesdk: ^0.1.9 copied to clipboard

Project integration Guardline SDK and API.

TODO: Integration of the Guardline SDK with the Guardline API and the use this package.

Features #

TODO: This project integrates the blinkid_flutter, image_picker, and bluecore-guardline-api packages.

Getting started #

TODO: Create flutter app. flutter create myapp cd myapp

add package guardlinesdk: ^0.1.0 on pubspec.yaml flutter run

Usage #

TODO: Open folder /example has two example, a "main sample simple.dart" and "main sample simple.dart". For test this files rename to main.dart.

First example using main "sample simple.dart"

change field [YOUR TOKEN HERE] to your token captured in the guardline portal The method onResult return Session ID used for you catch informations about ocr

import 'package:flutter/material.dart';
import 'package:guardlinesdk/guardlinepage.dart';

void main() {
  // Ensure DemoApp is defined in ../clientsdk/DemoApp.dart and imported correctly
  const token =
      '[YOUR TOKEN HERE]';

  runApp(
    GuardlinePage(
      token, // Replace with your actual token
      primaryColor: Colors.blueAccent,
      onResult: (String session) {
        print(session);
      },
    ),
  );
}

In the second example you need use GuardlineWidget inner you page as widget combining with outers components:

return GuardlineWidget(
    '[YOUR TOKEN HERE]', // Replace with your actual token
    primaryColor: Colors.orangeAccent,
    onResult: (session) {
        if (kDebugMode) {
        print('session: $session');
        }
    },
)

After return session you can call Api and return status of request:

onResult: (session) {
    GuardlineApi guardlineApi = GuardlineApi(widget.token)
    List<String> types = await guardlineApi.verify(session)

    if(types.length >= 1){
        final respType1 = await guardlineApi. verifyWithType(session, types[0])
    }

    if(types.length >= 2){
        final respType2 = await guardlineApi. verifyWithType(session, types[1])
    }
},

The possible type are data, proof_life and serpro

The return are array with fields returned of ocr

Additional information #

TODO: Choose option in parameters on main.