trustchex_flutter_sdk 1.508.1
trustchex_flutter_sdk: ^1.508.1 copied to clipboard
Identity verification and face authentication SDK with document scanning, liveness detection, NFC/eID reading, and biometric technology for Flutter apps.
trustchex_flutter_sdk #
Flutter SDK for KYC and identity verification with document scanning, facial recognition, liveness detection, and NFC eID support.
⚠️ Commercial License Required - Contact support@trustchex.com for licensing.
Features #
- 📄 Document scanning (passport, ID cards) with OCR
- 🔍 MRZ processing for travel documents
- 📱 NFC eID card reading
- 👤 Facial recognition and liveness detection
- 🌐 Multi-language support (English, Turkish)
- 🎨 Customizable branding
- 🔗 Deep link support
- 📊 Privacy-compliant analytics (GDPR, KVKK, PCI-DSS)
Installation #
dependencies:
trustchex_flutter_sdk: ^1.381.0
Setup #
iOS (Info.plist) #
<!-- Permissions -->
<key>NSCameraUsageDescription</key>
<string>The app captures images of your ID, passport, and face, and records a video for secure identity verification and ensure compliance with KYC regulations.</string>
<key>NSMicrophoneUsageDescription</key>
<string>The app records a video with audio for secure identity verification and ensure compliance with KYC regulations.</string>
<key>NFCReaderUsageDescription</key>
<string>The app securely reads ID or passport data using NFC to verify your identity and ensure compliance with KYC regulations.</string>
<!-- Optional — only when MASAK Tebliğ 32 Art. 4/C geolocation is enabled
(collectGeolocation step flag). See "MASAK Tebliğ 32 (Art. 4/C)" below. -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your approximate location is collected once during identity verification to satisfy regulatory technical-data requirements.</string>
<!-- NFC Configuration -->
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
<string>E80704007F00070302</string>
<string>A000000167455349474E</string>
<string>A0000002480100</string>
<string>A0000002480200</string>
<string>A0000002480300</string>
<string>A00000045645444C2D3031</string>
</array>
<!-- Portrait Only -->
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
Android (AndroidManifest.xml) #
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Optional — only when MASAK Tebliğ 32 Art. 4/C geolocation is enabled
(collectGeolocation step flag). See "MASAK Tebliğ 32 (Art. 4/C)" below. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- Hardware -->
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />
<!-- Set minimum SDK version in android/app/build.gradle -->
<!-- minSdkVersion 24 -->
MASAK Tebliğ 32 (Art. 4/C) #
For remote KYC of non-Turkish nationals via NFC passport, the SDK runs the
Article 4/C checks when the server-side workflow enables them per step
(passiveAuth, enforceChipVizMatch, collectGeolocation,
addressProofRequired, blockedNationalities, requireOperator,
enforcePassiveAuth). These are driven entirely by the backend — no client code
is required to turn them on. The SDK computes the chip↔VIZ verdict and Passive
Authentication integrity on-device and sends the artifacts; the server makes
the authoritative decision.
Geolocation (Art. 4/C(1)(e)) #
Geolocation is captured natively, with no third-party plugin — iOS Core
Location, Android LocationManager, through the SDK's own platform channel. When
a step has collectGeolocation enabled, the SDK takes a single coarse fix on its
own; there is no app-side code to write.
The only setup is declaring the OS permission strings (already shown in the iOS and Android setup above):
- iOS
NSLocationWhenInUseUsageDescription— Core Location shows the system prompt on first use given this string. - Android
ACCESS_COARSE_LOCATION— the SDK requests it at runtime.
Everything is fail-soft: if location services are off, permission is denied, or the fix times out, the SDK sends nothing and the flow proceeds — the backend treats a missing fix as "not provided" while still recording that it was expected. The fix is rounded to ~3 decimals (~110 m) before sending.
Usage #
Basic #
import 'package:trustchex_flutter_sdk/trustchex_flutter_sdk.dart';
TrustchexView(
baseUrl: 'https://your-server.com',
sessionId: 'session-id',
onCompleted: () => print('Completed'),
onError: (error) => print(error),
)
With Branding #
TrustchexView(
baseUrl: 'https://your-server.com',
sessionId: 'session-id',
branding: TrustchexBranding(
logoUrl: 'https://your-logo.png',
primaryColor: Color(0xFF1E3A8A),
secondaryColor: Color(0xFFF3F4F6),
tertiaryColor: Color(0xFFEF4444),
),
locale: TrustchexLocale.en, // 'en' | 'tr'
enableAnalytics: true,
onCompleted: () => print('Completed'),
onError: (error) => print(error),
)
With Custom Analytics Tracking #
import 'package:trustchex_flutter_sdk/trustchex_flutter_sdk.dart';
// Access analytics service
final analytics = AnalyticsService.instance;
// Track custom events
await analytics.trackButtonClick('custom_button', screenName: 'custom_screen');
await analytics.trackScreenView('custom_screen');
// Right to be forgotten
await analytics.clear();
Deep Links #
import 'package:trustchex_flutter_sdk/trustchex_sdk.dart';
final parsed = DeeplinkUtils.parseDeepLink('scheme://verification-session/abc123/app-url/api.server.com');
if (parsed != null && parsed['sessionId'] != null) {
TrustchexView(
sessionId: parsed['sessionId']!,
baseUrl: parsed['baseUrl'] ?? 'https://api.trustchex.com',
);
}
API #
| Prop | Type | Description |
|---|---|---|
baseUrl |
String? |
Server URL |
sessionId |
String? |
Verification session ID |
branding |
TrustchexBranding? |
Theme colors and logo |
locale |
TrustchexLocale? |
UI language (en | tr) |
enableAnalytics |
bool? |
Enable analytics (default: true) |
onCompleted |
Function? |
Success callback |
onError |
Function? |
Error callback |
Analytics #
The SDK includes privacy-compliant analytics that respects GDPR, KVKK, and PCI-DSS regulations.
Key Features #
- ✅ No PII collected - No names, emails, addresses, or personal data
- ✅ Data anonymization - Device identifiers excluded
- ✅ Right to deletion - Users can clear their data
Usage #
Analytics is enabled by default. To customize:
TrustchexView(
enableAnalytics: true, // Enable/disable analytics
// ...other props
)
Requirements #
- Flutter ≥ 3.16.0
- Dart ≥ 3.0.0
- iOS ≥ 12.0 / Android ≥ API 24
- Camera required for document scanning
- NFC optional for eID cards
Troubleshooting #
- Camera issues: Check permissions and device capability
- NFC not working: Enable NFC in device settings (optional feature)
- Build errors: Verify all dependencies are installed correctly
License #
Commercial license required. Contact support@trustchex.com for pricing.