fromWire static method

Decode a camelCase wire string. Returns null on null or unknown values since the source field is optional (absent on web-originating offers).

Implementation

static UserOfferSourceStorefront? fromWire(String? s) {
  switch (s) {
    case 'storeKit':
      return UserOfferSourceStorefront.storeKit;
    case 'playStore':
      return UserOfferSourceStorefront.playStore;
    default:
      return null;
  }
}