SoliqID
SoliqID is a Flutter plugin for face identification and detection, powered by Google ML Kit technology.
It works on both Android and iOS, and provides passive liveness detection by scanning the user's face.
Screenshot
Features
- Real-time face detection
- Head position tracking
- Eyes and mouth open/closed detection
- Powered by Google ML Kit
- Supports Uzbek and English languages
Usage
openScanner() async {
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SoliqId(
/// User pinfl
/// Example: 12345678912345
pinfl: "",
infoType: InfoType.passport,
passportSeries: "passportSeries",
passportNumber: "passportNumber",
birthDate: "birthDate",
/// User localization type
localizationType: LocalizationType.UZ,
/// User guid
/// Guid as a token given by the server
guid:
"token",
/// User application guid
applicationGuid: "applicationGuid",
/// Navigate to Result Screen
/// If true, the user will be navigated to the result screen after the process is completed
onNavigate: false,
/// Event callback function
/// This function will be called when the process is completed
/// It will return the result of the process
/// Example: {"status": "success", "message": "User successfully verified"}
onEvent: event,
),
),
);
}
void event(Map<String, dynamic> event) {
/// Example:
// { "success": success,
// "code": code,
// "message": message,
// "id": id,
// "token": token,
// "data": {
// "pinfl": pinfl,
// "surName": sureName,
// "name": name,
// "patronymicName": fatherName,
// "birthDate": birthDate,
// "birthPlace": birthPlace,
// "docSerial": docSerial,
// "docNumber": docNumber,
// "livingPlace": livingPlace,
// "docGiveDate": docGivenDate,
// "docExpirationDate": docExpireDate,
// "docGivePlace": docGivenPlace,
// "status": status,
// }
// }
print(event);
}
Installation
Add this to your pubspec.yaml
:
dependencies:
soliq_id: latest_version
Or install it via command line:
flutter pub add soliq_id
iOS
Add the required camera permission to your Info.plist:
<plist version="1.0">
<dict>
<!-- Add these two elements: -->
<key>NSCameraUsageDescription</key>
<string>App needs camera access for YuzID</string>
<!-- ... -->
</dict>
</plist>
Ensure your minimum iOS version is set to 13 or higher in your ios/Podfile:
platform :ios, '13.0'
Add the following to your Podfile:
target 'Runner' do
use_frameworks! :linkage => :static
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
Android
Add the required permissions and activities to your AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<application
...
<activity
android:name="uz.elusm.yuzid.YuzIDConnectorActivity"
android:exported="true"/>
<activity
android:name="uz.face.detection.ui.FaceDetectionActivity"
android:exported="true"/>
</application>