ChatShareTheme class sealed
This object describes the theme of the screen for sharing a link to a user or a chat. Currently, it can be one of:
ChatShareThemeEmojiChatShareThemeUniqueGift
- Available extensions
- Annotations
-
- @Freezed.new(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
Constructors
-
The theme is based on regular or custom emoji.
constfactory
-
Creates a ChatShareTheme from JSON.
factory
-
The theme is based on a unique gift.
constfactory
Properties
-
copyWith
→ $ChatShareThemeCopyWith<
ChatShareTheme> -
Create a copy of ChatShareTheme
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
- type → ChatShareThemeType
-
Type of the theme, always "emoji"
no setterinherited
Methods
-
map<
TResult extends Object?> ({required TResult emoji(ChatShareThemeEmoji value), required TResult uniqueGift(ChatShareThemeUniqueGift value)}) → TResult -
Available on ChatShareTheme, provided by the ChatShareThemePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? emoji(ChatShareThemeEmoji value)?, TResult? uniqueGift(ChatShareThemeUniqueGift value)?}) → TResult? -
Available on ChatShareTheme, provided by the ChatShareThemePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult emoji(ChatShareThemeEmoji value)?, TResult uniqueGift(ChatShareThemeUniqueGift value)?, required TResult orElse()}) → TResult -
Available on ChatShareTheme, provided by the ChatShareThemePatterns extension
A variant ofmapthat fallback to returningorElse. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ChatShareTheme to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited