AcceptedGiftTypes class abstract

This object describes the types of gifts that can be gifted to a user or a chat.

Available extensions
Annotations
  • @freezed

Constructors

AcceptedGiftTypes({@JsonKey.new(name: 'unlimited_gifts') bool? unlimitedGifts, @JsonKey.new(name: 'limited_gifts') bool? limitedGifts, @JsonKey.new(name: 'unique_gifts') bool? uniqueGifts, @JsonKey.new(name: 'premium_subscription') bool? premiumSubscription, @JsonKey.new(name: 'gifts_from_channels') bool? giftsFromChannels})
Creates a new AcceptedGiftTypes object.
const
factory
AcceptedGiftTypes.fromJson(Map<String, dynamic> json)
Creates a new AcceptedGiftTypes object from a JSON Map.
factory

Properties

copyWith → $AcceptedGiftTypesCopyWith<AcceptedGiftTypes>
Create a copy of AcceptedGiftTypes with the given fields replaced by the non-null parameter values.
no setterinherited
giftsFromChannels bool?
Optional. True, if transfers of unique gifts from channels are accepted
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
limitedGifts bool?
Optional. True, if limited regular gifts are accepted
no setterinherited
premiumSubscription bool?
Optional. True, if a Telegram Premium subscription is accepted
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uniqueGifts bool?
Optional. True, if unique gifts or gifts that can be upgraded to unique for free are accepted
no setterinherited
unlimitedGifts bool?
Optional. True, if unlimited regular gifts are accepted
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_AcceptedGiftTypes value)) → TResult

Available on AcceptedGiftTypes, provided by the AcceptedGiftTypesPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_AcceptedGiftTypes value)?) → TResult?

Available on AcceptedGiftTypes, provided by the AcceptedGiftTypesPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_AcceptedGiftTypes value)?, {required TResult orElse()}) → TResult

Available on AcceptedGiftTypes, provided by the AcceptedGiftTypesPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this AcceptedGiftTypes to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited