BackgroundType class sealed

This object describes the type of a background.

Annotations
  • @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

BackgroundType.chatTheme({@JsonKey(name: 'type') @Default(BackgroundTypeType.chatTheme) BackgroundTypeType type, @JsonKey(name: 'theme_name') required String themeName})
The background is taken directly from a built-in chat theme.
const
factory
BackgroundType.fill({@JsonKey(name: 'type') @Default(BackgroundTypeType.fill) BackgroundTypeType type, @JsonKey(name: 'fill') required BackgroundFill fill, @JsonKey(name: 'dark_theme_dimming') @Default(0) int darkThemeDimming})
The background is automatically filled based on the selected colors.
const
factory
BackgroundType.fromJson(Map<String, Object?> json)
Create the BackgroundType instance from JSON Map
factory
BackgroundType.pattern({@JsonKey(name: 'type') @Default(BackgroundTypeType.pattern) BackgroundTypeType type, @JsonKey(name: 'document') required Document document, @JsonKey(name: 'fill') required BackgroundFill fill, @JsonKey(name: 'intensity') @Default(0) int intensity, @JsonKey(name: "is_inverted") bool? isInverted, @JsonKey(name: "is_moving") bool? isMoving})
The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.
const
factory
BackgroundType.wallpaper({@JsonKey(name: 'type') @Default(BackgroundTypeType.wallpaper) BackgroundTypeType type, @JsonKey(name: 'document') required Document document, @JsonKey(name: "dark_theme_dimming") @Default(0) int darkThemeDimming, @JsonKey(name: "is_blurred") bool? isBlurred, @JsonKey(name: "is_moving") bool? isMoving})
The background is automatically filled based on the selected colors.
const
factory

Properties

copyWith → $BackgroundTypeCopyWith<BackgroundType>
Create a copy of BackgroundType 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 BackgroundTypeType
Type of the background - always fill
no setterinherited

Methods

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

Operators

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