accountAssetsVerificationStatusFromJson function
AccountAssetsVerificationStatus
accountAssetsVerificationStatusFromJson(
- Object? accountAssetsVerificationStatus, [
- AccountAssetsVerificationStatus? defaultValue
Implementation
enums.AccountAssetsVerificationStatus accountAssetsVerificationStatusFromJson(
Object? accountAssetsVerificationStatus, [
enums.AccountAssetsVerificationStatus? defaultValue,
]) {
if (accountAssetsVerificationStatus is String) {
return enums.$AccountAssetsVerificationStatusMap.entries
.firstWhere(
(element) =>
element.value.toLowerCase() ==
accountAssetsVerificationStatus.toLowerCase(),
orElse: () => const MapEntry(
enums.AccountAssetsVerificationStatus.swaggerGeneratedUnknown,
''))
.key;
}
final parsedResult = defaultValue == null
? null
: enums.$AccountAssetsVerificationStatusMap.entries
.firstWhereOrNull((element) => element.value == defaultValue)
?.key;
return parsedResult ??
defaultValue ??
enums.AccountAssetsVerificationStatus.swaggerGeneratedUnknown;
}