TextQuote class abstract

Contains information about the quoted part of a message that is replied to by the given message.

Available extensions
Annotations
  • @freezed

Constructors

TextQuote({@JsonKey.new(name: 'text') required String text, @JsonKey.new(name: 'entities') List<MessageEntity>? entities, @JsonKey.new(name: 'position') required int position, @JsonKey.new(name: 'is_manual') bool? isManual})
Constructs a TextQuote.
const
factory
TextQuote.fromJson(Map<String, dynamic> json)
Creates a TextQuote object from a JSON object.
factory

Properties

copyWith → $TextQuoteCopyWith<TextQuote>
Create a copy of TextQuote with the given fields replaced by the non-null parameter values.
no setterinherited
entities → List<MessageEntity>?
Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isManual → bool?
True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.
no setterinherited
position → int
Approximate quote position in the original message in UTF-16 code units as specified by the sender.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
Text of the quoted part of a message that is replied to by the given message.
no setterinherited

Methods

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

Available on TextQuote, provided by the TextQuotePatterns extension

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

Available on TextQuote, provided by the TextQuotePatterns extension

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

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

Operators

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