flutter_tflite_web 3.0.0
flutter_tflite_web: ^3.0.0 copied to clipboard
A Flutter package for identity validation using TensorFlow Lite with document and face detection. Supports DNI capture and selfie validation for web platforms.
example/example.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_tflite_web/bloc/reconocimiento/reconocimiento_bloc.dart';
/// Example showing how to use flutter_tflite_web for identity validation
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter TFLite Web Example',
home: const ValidationExample(),
);
}
}
class ValidationExample extends StatelessWidget {
const ValidationExample({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Identity Validation Example'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
// Start the validation process
context.read<ReconocimientoBloc>().add(OnInitReconocimiento());
},
child: const Text('Start Validation'),
),
),
);
}
}