fromId static method
- String? prefix
Get the ReportType of a Report by its ID prefix.
Implementation
static ReportType? fromId(String? prefix) {
switch (prefix) {
case ModelPrefixes.cashFlowReport:
return ReportType.cashFlow;
case ModelPrefixes.paymentLogReport:
return ReportType.paymentLog;
case ModelPrefixes.refundReport:
return ReportType.refund;
case ModelPrefixes.shipmentReport:
return ReportType.shipment;
case ModelPrefixes.shipmentInvoiceReport:
return ReportType.shipmentInvoice;
case ModelPrefixes.trackerReport:
return ReportType.tracker;
default:
return null;
}
}