Re-KYC Flutter Package
A Flutter package for facilitating the re-KYC (Know Your Customer) process in mobile applications. This package allows users to easily update their KYC details in compliance with regulatory requirements, improving user verification and account security.
Features
- Support for uploading and validating KYC documents.
- User-friendly forms for updating personal information.
- Integration with authentication and identity verification services.
- Secure data handling and compliance with industry standards.
Getting started
Prerequisites
- Flutter 2.0 or later.
- A backend service for validating and storing KYC data.
Installation
Add the following dependency to your pubspec.yaml
:
dependencies:
flutter_meon_rekyc: ^1.0.4
```dart
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter Re-KYC App'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Input for Client ID
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: TextField(
controller: clientIdController,
decoration: const InputDecoration(
labelText: 'Enter Client ID',
border: OutlineInputBorder(),
),
),
),
const SizedBox(height: 10), // Space between inputs
// Input for Workflow ID
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: TextField(
controller: workflowIdController,
decoration: const InputDecoration(
labelText: 'Enter Workflow ID',
border: OutlineInputBorder(),
),
),
),
const SizedBox(height: 20), // Space between inputs and buttons
// Re-KYC Button
ElevatedButton(
onPressed: () async {
bool permissionsGranted = await requestPermissions(context);
if (permissionsGranted) {
// Get values from input fields
String clientId = clientIdController.text;
String workflowId = workflowIdController.text;
// Ensure both fields are filled
if (clientId.isNotEmpty && workflowId.isNotEmpty) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SDKCallReKyc(
clientId: clientId, // Passing client ID
workflowId: workflowId, // Passing workflow ID
),
),
);
} else {
// Show alert if fields are empty
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text('Error'),
content: const Text('Please fill in both Client ID and Workflow ID.'),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('OK'),
),
],
),
);
}
}
},
child: const Text('Call Re-KYC SDK'),
),
],
),
),
);
}