mapFlutterPurchaseStatusToPurchaseStatus function
PurchaseStatus
mapFlutterPurchaseStatusToPurchaseStatus(
- FlutterPurchaseStatus? flutterPurchaseStatus
Implementation
PurchaseStatus mapFlutterPurchaseStatusToPurchaseStatus(
FlutterPurchaseStatus? flutterPurchaseStatus) {
return switch (flutterPurchaseStatus) {
FlutterPurchaseStatus.invoiceCreated => PurchaseStatus.invoiceCreated,
FlutterPurchaseStatus.cancelled => PurchaseStatus.cancelled,
FlutterPurchaseStatus.processing => PurchaseStatus.processing,
FlutterPurchaseStatus.rejected => PurchaseStatus.rejected,
FlutterPurchaseStatus.confirmed => PurchaseStatus.confirmed,
FlutterPurchaseStatus.refunded => PurchaseStatus.refunded,
FlutterPurchaseStatus.paid => PurchaseStatus.paid,
FlutterPurchaseStatus.reversed => PurchaseStatus.reversed,
null => PurchaseStatus.unknown
};
}