Sticker class abstract

This object represents a sticker.

Annotations
  • @freezed

Constructors

Sticker.new({@JsonKey(name: 'file_id') required String fileId, @JsonKey(name: 'file_unique_id') required String fileUniqueId, @JsonKey(name: 'type') required StickerType type, @JsonKey(name: 'width') required int width, @JsonKey(name: 'height') required int height, @JsonKey(name: 'is_animated') required bool isAnimated, @JsonKey(name: 'is_video') required bool isVideo, @JsonKey(name: 'thumbnail') PhotoSize? thumbnail, @JsonKey(name: 'emoji') String? emoji, @JsonKey(name: 'set_name') String? setName, @JsonKey(name: 'premium_animation') File? premiumAnimation, @JsonKey(name: 'mask_position') MaskPosition? maskPosition, @JsonKey(name: 'custom_emoji_id') String? customEmojiId, @JsonKey(name: 'file_size') int? fileSize, @JsonKey(name: 'needs_repainting') bool? needsRepainting})
Constructs a Sticker object
const
factory
Sticker.fromJson(Map<String, dynamic> json)
Creates a Sticker object from JSON object
factory

Properties

copyWith → $StickerCopyWith<Sticker>
Create a copy of Sticker with the given fields replaced by the non-null parameter values.
no setterinherited
customEmojiId String?
Optional. For custom emoji stickers, unique identifier of the custom emoji
no setterinherited
emoji String?
Optional. Emoji associated with the sticker
no setterinherited
fileId String
Identifier for this file, which can be used to download or reuse the file
no setterinherited
fileSize int?
Optional. File size in bytes
no setterinherited
fileUniqueId String
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
height int
Sticker height
no setterinherited
isAnimated bool
True, if the sticker is animated
no setterinherited
isVideo bool
True, if the sticker is a video sticker
no setterinherited
maskPosition MaskPosition?
Optional. For mask stickers, the position where the mask should be placed
no setterinherited
needsRepainting bool?
Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places
no setterinherited
premiumAnimation File?
Optional. For premium regular stickers, premium animation for the sticker
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setName String?
Optional. Name of the sticker set to which the sticker belongs
no setterinherited
thumbnail PhotoSize?
Optional. Sticker thumbnail in the .WEBP or .JPG format
no setterinherited
type StickerType
Type of the sticker, currently one of "regular", "mask", "custom_emoji". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.
no setterinherited
width int
Sticker width
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Sticker to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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