Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MYID Public Code
MyID Flutter SDK
Commits
b73d1276
Commit
b73d1276
authored
Jul 12, 2024
by
Javokhir
Browse files
Added distance
parent
45a5b089
Changes
12
Show whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
b73d1276
## 1.2.5
-
Added new
`distance`
method to sets the distance for taking photo.
## 1.2.4
*
🔨 Resolved CameraX Preview static screen: Addressed an issue causing the CameraX preview to display a static screen on specific devices.
...
...
README.md
View file @
b73d1276
...
...
@@ -9,9 +9,9 @@ MyID SDK flutter plugin.
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
Theme
](
#theme
)
Android SDK:
`
1.1.1
`
Android SDK:
`
2.3.3
`
iOS SDK:
`2.3.
1
`
iOS SDK:
`2.3.
3
`
## Project adjustments
...
...
android/build.gradle
View file @
b73d1276
...
...
@@ -49,5 +49,5 @@ android {
}
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
android/src/main/kotlin/uz/uzinfocom/myid/MyIdSdk.kt
View file @
b73d1276
...
...
@@ -71,6 +71,7 @@ class MyIdSdk(
val
resolution
:
MyIdResolution
val
imageFormat
:
MyIdImageFormat
val
organizationDetails
:
MyIdOrganizationDetails
val
distance
:
Float
try
{
clientId
=
config
.
fetch
(
"clientId"
)
...
...
@@ -82,6 +83,7 @@ class MyIdSdk(
sdkHash
=
config
.
fetch
(
"sdkHash"
)
externalId
=
config
.
fetch
(
"externalId"
)
threshold
=
config
.
fetch
(
"threshold"
).
toFloatOrNull
()
?:
0.55f
distance
=
config
.
fetch
(
"distance"
).
toFloatOrNull
()
?:
0.65f
buildMode
=
when
(
config
.
fetch
(
"buildMode"
).
uppercase
())
{
MyIdBuildMode
.
DEBUG
.
name
->
MyIdBuildMode
.
DEBUG
...
...
@@ -169,6 +171,7 @@ class MyIdSdk(
.
withResolution
(
resolution
)
.
withImageFormat
(
imageFormat
)
.
withOrganizationDetails
(
organizationDetails
)
.
withDistance
(
distance
)
.
build
()
currentActivity
?.
let
{
...
...
example/ios/Podfile.lock
View file @
b73d1276
...
...
@@ -2,8 +2,8 @@ PODS:
- Flutter (1.0.0)
- myid (1.1.2):
- Flutter
- MyIdSDK (= 2.3.
1
)
- MyIdSDK (2.3.
1
)
- MyIdSDK (= 2.3.
3
)
- MyIdSDK (2.3.
3
)
DEPENDENCIES:
- Flutter (from `Flutter`)
...
...
@@ -21,8 +21,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
myid:
c8a68a3693a90c7e8b953ff6750dfbbf89e9416
4
MyIdSDK:
490ce14b4681b2d2e4504cac97ea1679d85f5d54
myid:
28814a8deab60a4544b72e0e3f3418c8195e1de
4
MyIdSDK:
7e81df8dc44e318fee54591bb61de52a550cbf22
PODFILE CHECKSUM: 52781dfef5f5768442e4d2953d5b83f640ecec0c
...
...
example/lib/main.dart
View file @
b73d1276
...
...
@@ -38,8 +38,7 @@ class _MyAppState extends State<MyApp> {
buildMode:
MyIdBuildMode
.
PRODUCTION
,
entryType:
MyIdEntryType
.
AUTH
,
),
iosAppearance:
const
MyIdIOSAppearance
()
);
iosAppearance:
const
MyIdIOSAppearance
());
error
=
null
;
result
=
myIdResult
;
...
...
example/pubspec.lock
View file @
b73d1276
...
...
@@ -121,7 +121,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.
4
"
version: "1.2.
5
"
path:
dependency: transitive
description:
...
...
ios/Classes/MyIdSdk.swift
View file @
b73d1276
...
...
@@ -103,7 +103,8 @@ public func buildMyIdConfig(
let
sdkHash
=
config
[
"sdkHash"
]
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
??
""
var
buildMode
=
MyIdBuildMode
.
PRODUCTION
...
...
@@ -169,7 +170,7 @@ public func buildMyIdConfig(
config
.
minAge
=
minAge
config
.
sdkHash
=
sdkHash
config
.
externalId
=
externalId
config
.
threshold
=
threshold
config
.
threshold
=
Float
(
threshold
)
config
.
buildMode
=
buildMode
config
.
entryType
=
entryType
config
.
residency
=
residency
...
...
@@ -180,6 +181,7 @@ public func buildMyIdConfig(
config
.
withPhoto
=
withPhoto
config
.
appearance
=
appearance
config
.
organizationDetails
=
organizationDetails
config
.
distance
=
Float
(
distance
)
return
config
}
...
...
ios/myid.podspec
View file @
b73d1276
...
...
@@ -15,7 +15,7 @@ A new Flutter plugin.
s
.
source
=
{
:path
=>
'.'
}
s
.
source_files
=
'Classes/**/*'
s
.
dependency
'Flutter'
s
.
dependency
'MyIdSDK'
,
'2.3.
1
'
s
.
dependency
'MyIdSDK'
,
'2.3.
3
'
s
.
platform
=
:ios
,
'12.0'
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
...
...
lib/myid_config.dart
View file @
b73d1276
...
...
@@ -22,6 +22,7 @@ class MyIdConfig {
final
MyIdImageFormat
?
imageFormat
;
final
MyIdOrganizationDetails
?
organizationDetails
;
final
bool
?
withPhoto
;
final
double
?
distance
;
MyIdConfig
({
required
this
.
clientId
,
...
...
@@ -43,6 +44,7 @@ class MyIdConfig {
this
.
imageFormat
,
this
.
organizationDetails
,
this
.
withPhoto
,
this
.
distance
,
});
factory
MyIdConfig
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
=>
...
...
lib/myid_config.g.dart
View file @
b73d1276
...
...
@@ -27,6 +27,7 @@ MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) {
imageFormat:
_$enumDecodeNullable
(
_$MyIdImageFormatEnumMap
,
json
[
'imageFormat'
]),
organizationDetails:
MyIdOrganizationDetails
.
fromJson
(
json
[
'organizationDetails'
]
as
Map
<
String
,
dynamic
>),
withPhoto:
json
[
'withPhoto'
]
as
bool
,
distance:
json
[
'distance'
]
as
double
,
);
}
...
...
@@ -58,6 +59,7 @@ Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) {
writeNotNull
(
'imageFormat'
,
_$MyIdImageFormatEnumMap
[
instance
.
imageFormat
]);
writeNotNull
(
'organizationDetails'
,
instance
.
organizationDetails
?.
toJson
());
writeNotNull
(
'withPhoto'
,
instance
.
withPhoto
);
writeNotNull
(
'distance'
,
instance
.
distance
);
return
val
;
}
...
...
pubspec.yaml
View file @
b73d1276
name
:
myid
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
repository
:
https://pub.dev/packages/myid
issue_tracker
:
https://gitlab.myid.uz/myid-public-code/myid-sample-flutter/-/issues
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment