SKProductSubscriptionPeriodWrapper.fromJson constructor

SKProductSubscriptionPeriodWrapper.fromJson(
  1. Map<String, dynamic>? map
)

Constructing an instance from a map from the Objective-C layer.

This method should only be used with map values returned by SKProductDiscountWrapper.fromJson or SKProductWrapper.fromJson.

Implementation

factory SKProductSubscriptionPeriodWrapper.fromJson(
    Map<String, dynamic>? map) {
  if (map == null) {
    return SKProductSubscriptionPeriodWrapper(
        numberOfUnits: 0, unit: SKSubscriptionPeriodUnit.day);
  }
  return _$SKProductSubscriptionPeriodWrapperFromJson(map);
}