ChatBoost class abstract

This object contains information about a chat boost.

Available extensions
Annotations
  • @freezed

Constructors

ChatBoost({@JsonKey.new(name: 'boost_id') required String boostId, @JsonKey.new(name: 'add_date') required int addDate, @JsonKey.new(name: 'expiration_date') required int expirationDate, @JsonKey.new(name: 'source') required ChatBoostSource source})
Creates a chat boost.
const
factory
ChatBoost.fromJson(Map<String, dynamic> json)
Creates a ChatBoost object from a JSON object.
factory

Properties

addDate → int
Point in time (Unix timestamp) when the chat was boosted
no setterinherited
boostId → String
Unique identifier of the boost
no setterinherited
copyWith → $ChatBoostCopyWith<ChatBoost>
Create a copy of ChatBoost with the given fields replaced by the non-null parameter values.
no setterinherited
expirationDate → int
Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → ChatBoostSource
Source of the added boost
no setterinherited

Methods

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

Available on ChatBoost, provided by the ChatBoostPatterns extension

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

Available on ChatBoost, provided by the ChatBoostPatterns extension

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

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

Operators

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