Commit b73d1276 authored by Javokhir's avatar Javokhir
Browse files

Added distance

parent 45a5b089
## 1.2.5
- Added new `distance` method to sets the distance for taking photo.
## 1.2.4 ## 1.2.4
* 🔨 Resolved CameraX Preview static screen: Addressed an issue causing the CameraX preview to display a static screen on specific devices. * 🔨 Resolved CameraX Preview static screen: Addressed an issue causing the CameraX preview to display a static screen on specific devices.
......
...@@ -9,9 +9,9 @@ MyID SDK flutter plugin. ...@@ -9,9 +9,9 @@ MyID SDK flutter plugin.
- [SDK error codes](#sdk-error-codes) - [SDK error codes](#sdk-error-codes)
- [Theme](#theme) - [Theme](#theme)
Android SDK: `1.1.1` Android SDK: `2.3.3`
iOS SDK: `2.3.1` iOS SDK: `2.3.3`
## Project adjustments ## Project adjustments
......
...@@ -49,5 +49,5 @@ android { ...@@ -49,5 +49,5 @@ android {
} }
dependencies { dependencies {
implementation("uz.myid.sdk.capture:myid-flutter-capture-sdk:1.1.1") implementation("uz.myid.sdk.capture:myid-capture-sdk-bundled:2.3.3")
} }
\ No newline at end of file
...@@ -71,6 +71,7 @@ class MyIdSdk( ...@@ -71,6 +71,7 @@ class MyIdSdk(
val resolution: MyIdResolution val resolution: MyIdResolution
val imageFormat: MyIdImageFormat val imageFormat: MyIdImageFormat
val organizationDetails: MyIdOrganizationDetails val organizationDetails: MyIdOrganizationDetails
val distance: Float
try { try {
clientId = config.fetch("clientId") clientId = config.fetch("clientId")
...@@ -82,6 +83,7 @@ class MyIdSdk( ...@@ -82,6 +83,7 @@ class MyIdSdk(
sdkHash = config.fetch("sdkHash") sdkHash = config.fetch("sdkHash")
externalId = config.fetch("externalId") externalId = config.fetch("externalId")
threshold = config.fetch("threshold").toFloatOrNull() ?: 0.55f threshold = config.fetch("threshold").toFloatOrNull() ?: 0.55f
distance = config.fetch("distance").toFloatOrNull() ?: 0.65f
buildMode = when (config.fetch("buildMode").uppercase()) { buildMode = when (config.fetch("buildMode").uppercase()) {
MyIdBuildMode.DEBUG.name -> MyIdBuildMode.DEBUG MyIdBuildMode.DEBUG.name -> MyIdBuildMode.DEBUG
...@@ -169,6 +171,7 @@ class MyIdSdk( ...@@ -169,6 +171,7 @@ class MyIdSdk(
.withResolution(resolution) .withResolution(resolution)
.withImageFormat(imageFormat) .withImageFormat(imageFormat)
.withOrganizationDetails(organizationDetails) .withOrganizationDetails(organizationDetails)
.withDistance(distance)
.build() .build()
currentActivity?.let { currentActivity?.let {
......
...@@ -2,8 +2,8 @@ PODS: ...@@ -2,8 +2,8 @@ PODS:
- Flutter (1.0.0) - Flutter (1.0.0)
- myid (1.1.2): - myid (1.1.2):
- Flutter - Flutter
- MyIdSDK (= 2.3.1) - MyIdSDK (= 2.3.3)
- MyIdSDK (2.3.1) - MyIdSDK (2.3.3)
DEPENDENCIES: DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
...@@ -21,8 +21,8 @@ EXTERNAL SOURCES: ...@@ -21,8 +21,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
myid: c8a68a3693a90c7e8b953ff6750dfbbf89e94164 myid: 28814a8deab60a4544b72e0e3f3418c8195e1de4
MyIdSDK: 490ce14b4681b2d2e4504cac97ea1679d85f5d54 MyIdSDK: 7e81df8dc44e318fee54591bb61de52a550cbf22
PODFILE CHECKSUM: 52781dfef5f5768442e4d2953d5b83f640ecec0c PODFILE CHECKSUM: 52781dfef5f5768442e4d2953d5b83f640ecec0c
......
...@@ -38,8 +38,7 @@ class _MyAppState extends State<MyApp> { ...@@ -38,8 +38,7 @@ class _MyAppState extends State<MyApp> {
buildMode: MyIdBuildMode.PRODUCTION, buildMode: MyIdBuildMode.PRODUCTION,
entryType: MyIdEntryType.AUTH, entryType: MyIdEntryType.AUTH,
), ),
iosAppearance: const MyIdIOSAppearance() iosAppearance: const MyIdIOSAppearance());
);
error = null; error = null;
result = myIdResult; result = myIdResult;
......
...@@ -121,7 +121,7 @@ packages: ...@@ -121,7 +121,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "1.2.4" version: "1.2.5"
path: path:
dependency: transitive dependency: transitive
description: description:
......
...@@ -103,7 +103,8 @@ public func buildMyIdConfig( ...@@ -103,7 +103,8 @@ public func buildMyIdConfig(
let sdkHash = config["sdkHash"] as? String ?? "" let sdkHash = config["sdkHash"] as? String ?? ""
let externalId = config["externalId"] as? String ?? "" let externalId = config["externalId"] as? String ?? ""
let threshold = config["threshold"] as? Float ?? 0.55 let threshold = config["threshold"] as? Double ?? 0.55
let distance = config["distance"] as? Double ?? 0.60
let buildModeKey = config["buildMode"] as? String ?? "" let buildModeKey = config["buildMode"] as? String ?? ""
var buildMode = MyIdBuildMode.PRODUCTION var buildMode = MyIdBuildMode.PRODUCTION
...@@ -169,7 +170,7 @@ public func buildMyIdConfig( ...@@ -169,7 +170,7 @@ public func buildMyIdConfig(
config.minAge = minAge config.minAge = minAge
config.sdkHash = sdkHash config.sdkHash = sdkHash
config.externalId = externalId config.externalId = externalId
config.threshold = threshold config.threshold = Float(threshold)
config.buildMode = buildMode config.buildMode = buildMode
config.entryType = entryType config.entryType = entryType
config.residency = residency config.residency = residency
...@@ -180,6 +181,7 @@ public func buildMyIdConfig( ...@@ -180,6 +181,7 @@ public func buildMyIdConfig(
config.withPhoto = withPhoto config.withPhoto = withPhoto
config.appearance = appearance config.appearance = appearance
config.organizationDetails = organizationDetails config.organizationDetails = organizationDetails
config.distance = Float(distance)
return config return config
} }
......
...@@ -15,7 +15,7 @@ A new Flutter plugin. ...@@ -15,7 +15,7 @@ A new Flutter plugin.
s.source = { :path => '.' } s.source = { :path => '.' }
s.source_files = 'Classes/**/*' s.source_files = 'Classes/**/*'
s.dependency 'Flutter' s.dependency 'Flutter'
s.dependency 'MyIdSDK', '2.3.1' s.dependency 'MyIdSDK', '2.3.3'
s.platform = :ios, '12.0' s.platform = :ios, '12.0'
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
......
...@@ -22,6 +22,7 @@ class MyIdConfig { ...@@ -22,6 +22,7 @@ class MyIdConfig {
final MyIdImageFormat? imageFormat; final MyIdImageFormat? imageFormat;
final MyIdOrganizationDetails? organizationDetails; final MyIdOrganizationDetails? organizationDetails;
final bool? withPhoto; final bool? withPhoto;
final double? distance;
MyIdConfig({ MyIdConfig({
required this.clientId, required this.clientId,
...@@ -43,6 +44,7 @@ class MyIdConfig { ...@@ -43,6 +44,7 @@ class MyIdConfig {
this.imageFormat, this.imageFormat,
this.organizationDetails, this.organizationDetails,
this.withPhoto, this.withPhoto,
this.distance,
}); });
factory MyIdConfig.fromJson(Map<String, dynamic> json) => factory MyIdConfig.fromJson(Map<String, dynamic> json) =>
......
...@@ -27,6 +27,7 @@ MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) { ...@@ -27,6 +27,7 @@ MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) {
imageFormat: _$enumDecodeNullable(_$MyIdImageFormatEnumMap, json['imageFormat']), imageFormat: _$enumDecodeNullable(_$MyIdImageFormatEnumMap, json['imageFormat']),
organizationDetails: MyIdOrganizationDetails.fromJson(json['organizationDetails'] as Map<String, dynamic>), organizationDetails: MyIdOrganizationDetails.fromJson(json['organizationDetails'] as Map<String, dynamic>),
withPhoto: json['withPhoto'] as bool, withPhoto: json['withPhoto'] as bool,
distance: json['distance'] as double,
); );
} }
...@@ -58,6 +59,7 @@ Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) { ...@@ -58,6 +59,7 @@ Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) {
writeNotNull('imageFormat', _$MyIdImageFormatEnumMap[instance.imageFormat]); writeNotNull('imageFormat', _$MyIdImageFormatEnumMap[instance.imageFormat]);
writeNotNull('organizationDetails', instance.organizationDetails?.toJson()); writeNotNull('organizationDetails', instance.organizationDetails?.toJson());
writeNotNull('withPhoto', instance.withPhoto); writeNotNull('withPhoto', instance.withPhoto);
writeNotNull('distance', instance.distance);
return val; return val;
} }
......
name: myid name: myid
description: MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity. description: MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity.
version: 1.2.4 version: 1.2.5
homepage: https://pub.dev/packages/myid homepage: https://pub.dev/packages/myid
repository: https://pub.dev/packages/myid repository: https://pub.dev/packages/myid
issue_tracker: https://gitlab.myid.uz/myid-public-code/myid-sample-flutter/-/issues issue_tracker: https://gitlab.myid.uz/myid-public-code/myid-sample-flutter/-/issues
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment