currency method

String currency()

Returns the product currency regardless of platform information

Implementation

String currency() {
  if (Platform.isAndroid) {
    return defaultPrice?.currency ?? "";
  } else if (Platform.isIOS) {
    if (purchaseType == "2") {
      var subsPrice = prices?.firstWhere(
          (element) => element.currency == (appleCurrency ?? ""));
      return subsPrice?.currency ?? "";
    }
    return appleActivePriceDetail?.currency ?? "";
  }
  return "";
}