Skip to main content

acessobio_plugin 0.0.8 copy "acessobio_plugin: ^0.0.8" to clipboard
acessobio_plugin: ^0.0.8 copied to clipboard

discontinued
outdated

Esta biblioteca visa implementar a tecnologia Unico para prova de vida sob.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:acessobio_plugin_example/acessoPass.dart';
import 'package:acessobio_plugin/acessobio_plugin.dart';
import 'package:acessobio_plugin/abstracts/IAcessoBio.dart';
import 'package:acessobio_plugin/abstracts/IAcessoBioAuthenticate.dart';
import 'package:acessobio_plugin/abstracts/IAcessoBioCamera.dart';
import 'package:acessobio_plugin/abstracts/IAcessoBioDocument.dart';
import 'package:acessobio_plugin/abstracts/IAcessoBioLiveness.dart';
import 'package:acessobio_plugin/result/success/OCRResponse.dart';
import 'package:acessobio_plugin/result/success/ResultAuthenticate.dart';
import 'package:acessobio_plugin/result/success/ResultCamera.dart';
import 'package:acessobio_plugin/result/success/ResultLivenessX.dart';
import 'package:acessobio_plugin/result/success/ResultCameraDocument.dart';
import 'package:acessobio_plugin/result/success/ResultFacematch.dart';
import 'package:acessobio_plugin/result/error/ErrorBio.dart';


void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget  {
  @override
  _MyAppState createState() => _MyAppState();
}


class _MyAppState extends State<MyApp> implements IAcessoBio, IAcessoBioCamera, IAcessoBioDocument, IAcessoBioLiveness, IAcessoBioAuthenticate {

  String _platformVersion;

  @override
  void initState() {
    super.initState();
  }

  Future<void> initPlatformState() async {

    String platformVersion = "Esta biblioteca visa implementar a tecnologia Unico";

    //Inicialmente, para utilizar a tecnologia implemente a classe Acessobio.
    //Implementar construtor de acordo com a tecnologia que ira utilizar

    AcessoBio acessobio = new AcessoBio(
        this,
        acessoPass.url,
        acessoPass.apikey,
        acessoPass.token
    );

    //  --- LIVENESS ---
    acessobio.openLiveness;
    // acessobio.openLivenessWithCreateProcess("lucas diniz","12345678909");


    //  --- DOCUMENT ---
    // acessobio.openCameraDocumentOCR(AcessoBio.CNH);
    // acessobio.openFaceMatch(AcessoBio.CNH);
    // acessobio.openCameraDocument(AcessoBio.CNH);


    //  --- AUTH ---
    // acessobio.openLivenessAuthenticate("12345678909");


    //  --- CAMERA ---
    // acessobio.openCamera;
    // acessobio.openCameraWithCreateProcess("lucas", "12345678909",null,null,null,null);
    // acessobio.openCameraWithCreateProcessAndInsertDocument("12345678909", "Lucas Diniz", AcessoBio.CNH);// no IOS ainda nao foi inplementado // retornando na interface errada


    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app unico'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: initPlatformState,
          tooltip: 'Increment',
          child: Icon(Icons.add),
        ),
      ),
    );
  }


  //OVERRIDES

  //region -- IAcessoBio
  @override
  void onErrorAcessoBio(ErrorBio errorBio) {
    // TODO: implement onErrorAcessoBio
  }

  @override
  void userClosedCameraManually() {
    // TODO: implement userClosedCameraManually
  }

  //endregion

  //region -- IAcessoBioCamera
  @override
  void onErrorCamera(ErrorBio errorBio) {
    // TODO: implement onErrorCamera
  }

  @override
  void onErrorDocumentInsert(String error) {
    // TODO: implement onErrorDocumentInsert
  }

  @override
  void onSuccessCamera(ResultCamera result) {
    // TODO: implement onSuccessCamera
  }

  @override
  void onSucessDocumentInsert(String processId, String typed) {
    // TODO: implement onSucessDocumentInsert
  }

  //endregion

  //region -- IAcessoBioDocument
  @override
  void onErrorDocument(String error) {
    // TODO: implement onErrorDocument
  }

  @override
  void onErrorFaceMatch(String error) {
    // TODO: implement onErrorFaceMatch
  }

  @override
  void onErrorOCR(String error) {
    // TODO: implement onErrorOCR
  }

  @override
  void onSuccessFaceMatch(ResultFacematch result) {
    // TODO: implement onSuccessFaceMatch
  }

  @override
  void onSuccessOCR(OCRResponse ocr) {
    // TODO: implement onSuccessOCR
  }

  @override
  void onSuccesstDocument(ResultCameraDocument result) {
    // TODO: implement onSuccesstDocument
  }

  //endregion

  //region -- IAcessoBioLiveness
  @override
  void onErrorLiveness(ErrorBio errorBio) {
    // TODO: implement onErrorLiveness
  }

  @override
  void onSuccessLiveness(ResultLivenessX result) {
    // TODO: implement onSuccessLiveness
  }

  //endregion

  //region -- IAcessoBioAuthenticate
  @override
  void onErrorAuthenticate(ErrorBio errorBio) {
    // TODO: implement onErrorAuthenticate
  }

  @override
  void onSuccessAuthenticate(ResultAuthenticate result) {
    // TODO: implement onSuccessAuthenticate
  }

  //endregion


}
0
likes
0
points
114
downloads

Publisher

unverified uploader

Weekly Downloads

Esta biblioteca visa implementar a tecnologia Unico para prova de vida sob.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on acessobio_plugin

Packages that implement acessobio_plugin