FtnStatus.fromJson constructor
Implementation
factory FtnStatus.fromJson(Map<String, dynamic> json) =>
switch (json['status']) {
'PENDING' => FtnPending.fromJson(json),
'COMPLETED' => FtnCompleted.fromJson(json),
'FAILED' => FtnFailed.fromJson(json),
final String status => FtnUnknown(status: status),
_ =>
throw IdentisureException(0, 'Invalid ftn status: ${json['status']}'),
};