| // GENERATED CODE - DO NOT MODIFY BY HAND |
| |
| part of 'enum_converters.dart'; |
| |
| // ************************************************************************** |
| // JsonSerializableGenerator |
| // ************************************************************************** |
| |
| _SerializedEnums _$_SerializedEnumsFromJson(Map json) { |
| return _SerializedEnums() |
| ..response = _$enumDecode(_$BillingResponseEnumMap, json['response']) |
| ..type = _$enumDecode(_$SkuTypeEnumMap, json['type']); |
| } |
| |
| Map<String, dynamic> _$_SerializedEnumsToJson(_SerializedEnums instance) => |
| <String, dynamic>{ |
| 'response': _$BillingResponseEnumMap[instance.response], |
| 'type': _$SkuTypeEnumMap[instance.type] |
| }; |
| |
| T _$enumDecode<T>(Map<T, dynamic> enumValues, dynamic source) { |
| if (source == null) { |
| throw ArgumentError('A value must be provided. Supported values: ' |
| '${enumValues.values.join(', ')}'); |
| } |
| return enumValues.entries |
| .singleWhere((e) => e.value == source, |
| orElse: () => throw ArgumentError( |
| '`$source` is not one of the supported values: ' |
| '${enumValues.values.join(', ')}')) |
| .key; |
| } |
| |
| const _$BillingResponseEnumMap = <BillingResponse, dynamic>{ |
| BillingResponse.featureNotSupported: -2, |
| BillingResponse.serviceDisconnected: -1, |
| BillingResponse.ok: 0, |
| BillingResponse.userCanceled: 1, |
| BillingResponse.serviceUnavailable: 2, |
| BillingResponse.billingUnavailable: 3, |
| BillingResponse.itemUnavailable: 4, |
| BillingResponse.developerError: 5, |
| BillingResponse.error: 6, |
| BillingResponse.itemAlreadyOwned: 7, |
| BillingResponse.itemNotOwned: 8 |
| }; |
| |
| const _$SkuTypeEnumMap = <SkuType, dynamic>{ |
| SkuType.inapp: 'inapp', |
| SkuType.subs: 'subs' |
| }; |