Options.fromJson constructor
Implementation
factory Options.fromJson(Map<String, dynamic> map) {
return Options(
clientId: map['clientId'],
clientSecret: map['clientSecret'],
sessionId: map['sessionId'],
environment: Environment.values[map['environment']],
phoneNumber: map['phoneNumber'],
phoneInputType: map['phoneInputType'] != null
? PhoneInputType.values[map['phoneInputType']]
: null,
otpInputType: map['otpInputType'] != null
? OtpInputType.values[map['otpInputType']]
: null,
userId: map['userId'],
userEventType: map['userEventType'] != null
? UserEventType.values[map['userEventType']]
: null,
merchantId: map['merchantId'],
additionalAttributes: Map<String, String>.from(map['additionalAttributes'] ?? {}),
);
}