OwnedGifts class abstract

Contains the list of gifts received and owned by a user or a chat.

Available extensions
Annotations
  • @freezed

Constructors

OwnedGifts({@JsonKey.new(name: 'total_count') required int totalCount, @JsonKey.new(name: 'gifts') required List<OwnedGift> gifts, @JsonKey.new(name: 'next_offset') String? nextOffset})
Creates a new OwnedGifts object.
const
factory
OwnedGifts.fromJson(Map<String, dynamic> json)
Creates a new OwnedGifts object from a JSON Map.
factory

Properties

copyWith → $OwnedGiftsCopyWith<OwnedGifts>
Create a copy of OwnedGifts with the given fields replaced by the non-null parameter values.
no setterinherited
gifts List<OwnedGift>
The list of gifts
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
nextOffset String?
Optional. Offset for pagination
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalCount int
The total number of gifts owned by the user or the chat
no setterinherited

Methods

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

Available on OwnedGifts, provided by the OwnedGiftsPatterns extension

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

Available on OwnedGifts, provided by the OwnedGiftsPatterns extension

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

Available on OwnedGifts, provided by the OwnedGiftsPatterns 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 OwnedGifts to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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