vove_id_flutter 0.0.3
vove_id_flutter: ^0.0.3 copied to clipboard
VOVE ID - Instant, seamless identity verification. Designed for trust, user-centric, fully compliant with AML/KYC. Optimized for the MEA region.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:vove_id_flutter/vove_id_flutter.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _idMatchingResult = 'Not started';
bool _isProcessing = false;
@override
void initState() {
super.initState();
}
Future<void> _processIDMatching() async {
setState(() {
_isProcessing = true;
_idMatchingResult = 'Processing...';
});
try {
final result = await Vove.processIDMatching(
environment: VoveEnvironment.sandbox,
sessionToken:
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2b3ZlSWQiOiI2NmJkZTIyNTBhN2ZhNzEyZDdmOTA2YjQiLCJyZWZJZCI6Ijk3ZWQxYmY5LTQ4ZTAtNDAzOC05OTg0LTFjMzEwYTRlNDU3MyIsIm9yZ0lkIjoiNjU4ZjAyZTQ4NmRkMWIzMmUzYjQwOTlmIiwic2Vzc2lvbklkIjoiZjJkZTBhNGItYzY1OS00YjEyLWJlMTgtOGFlZTdlNzU0ODA0IiwiaWF0IjoxNzIzNzIwMjMwLCJleHAiOjE3MjM3MjIwMzB9.nX11etT3JQBrwFbFfE1KS8FIB4CXtui3frLf1_Txay0',
locale: VoveLocale.en,
enableVocalGuidance: true,
);
setState(() {
_idMatchingResult = 'Result: $result';
});
} on PlatformException catch (e) {
setState(() {
_idMatchingResult = 'Error: ${e.message}';
});
} catch (e) {
setState(() {
_idMatchingResult = 'Unexpected error: $e';
});
} finally {
setState(() {
_isProcessing = false;
});
}
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Vove ID Flutter Example'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('ID Matching Result: $_idMatchingResult'),
const SizedBox(height: 20),
ElevatedButton(
onPressed: _isProcessing ? null : _processIDMatching,
child: const Text('Start ID Matching'),
),
],
),
),
),
);
}
}