fromJson static method
Returns a new EsimPurchasedInputs instance and imports its values from
value if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static EsimPurchasedInputs? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return EsimPurchasedInputs(
eid: mapValueOfType<String>(json, r'eid'),
imei2: mapValueOfType<String>(json, r'imei2'),
iccid: mapValueOfType<String>(json, r'iccid'),
travelStartDate: mapDateTime(json, r'travelStartDate', r''),
isInstant: mapValueOfType<bool>(json, r'isInstant'),
);
}
return null;
}