yuz_id 0.0.3
yuz_id: ^0.0.3 copied to clipboard
YuzID official library for users
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:yuz_id/yuz_id.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
Future<String?> runYuzID() async {
String? photoData;
try {
photoData = await YuzID.instance.runYuzID(lang: "uz");
} catch (e) {
photoData = "";
print("Something went wrong: $e");
}
return photoData;
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: InkWell(
onTap: (){
runYuzID();
},
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Text('YuzID'),
),
),
),
),
);
}
}