nashid_verify_sdk 0.0.7
nashid_verify_sdk: ^0.0.7 copied to clipboard
The nashid_verify_sdk Flutter plugin provides an interface to integrate the Nashid SDK into your application for document scanning and verification purposes.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:nashid_io_example/initialize_screen.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
// primary: Colors.deepPurple,
// surface: Colors.deepPurple,
),
useMaterial3: true,
),
home: const InitializeScreen(),
);
}
}
Future<void> showLoadingDialog(BuildContext context, {Color backgroundColor = Colors.transparent}) async {
return showDialog<void>(
context: context,
barrierColor: backgroundColor,
barrierDismissible: false,
builder: (BuildContext context) {
return const PopScope(
canPop: false,
child: Center(
child: CircularProgressIndicator(),
),
);
},
);
}
void showToast(BuildContext context, String message) {
final scaffold = ScaffoldMessenger.of(context);
scaffold.showSnackBar(
SnackBar(
content: Text(message),
action: SnackBarAction(label: 'OK', onPressed: scaffold.hideCurrentSnackBar),
),
);
}