DirectMessagesTopic class abstract

Describes a topic of a direct messages chat.

This object contains information about a topic in a direct messages chat, including its unique identifier and optionally the user who created it.

Available extensions
Annotations
  • @freezed

Constructors

DirectMessagesTopic({@JsonKey.new(name: 'topic_id') required int topicId, @JsonKey.new(name: 'user') User? user})
Creates a new DirectMessagesTopic object.
const
factory
DirectMessagesTopic.fromJson(Map<String, dynamic> json)
Creates a new DirectMessagesTopic object from a JSON Map.
factory

Properties

copyWith → $DirectMessagesTopicCopyWith<DirectMessagesTopic>
Create a copy of DirectMessagesTopic with the given fields replaced by the non-null parameter values.
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
topicId int
Unique identifier of the topic
no setterinherited
user User?
Optional. Information about the user that created the topic. Currently, it is always present according to Telegram documentation.
no setterinherited

Methods

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

Available on DirectMessagesTopic, provided by the DirectMessagesTopicPatterns extension

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

Available on DirectMessagesTopic, provided by the DirectMessagesTopicPatterns extension

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

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

Operators

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