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