BackgroundType.wallpaper constructor

const BackgroundType.wallpaper({
  1. @JsonKey(name: 'type') @Default(BackgroundTypeType.wallpaper) BackgroundTypeType type,
  2. @JsonKey(name: 'document') required Document document,
  3. @JsonKey(name: "dark_theme_dimming") @Default(0) int darkThemeDimming,
  4. @JsonKey(name: "is_blurred") bool? isBlurred,
  5. @JsonKey(name: "is_moving") bool? isMoving,
})

The background is automatically filled based on the selected colors.

Implementation

const factory BackgroundType.wallpaper({
  /// Type of the background - always `wallpaper`
  @JsonKey(name: 'type')
  @Default(BackgroundTypeType.wallpaper)
  BackgroundTypeType type,

  /// Document with the wallpaper.
  @JsonKey(name: 'document') required final Document document,

  /// Dimming of the background in dark themes, as a percentage; 0-100.
  @JsonKey(name: "dark_theme_dimming") @Default(0) final int darkThemeDimming,

  /// True, if the wallpaper is downscaled to fit in a 450x450 square and then
  /// box-blurred with radius 12.
  @JsonKey(name: "is_blurred") final bool? isBlurred,

  /// True, if the background moves slightly when the device is tilted.
  @JsonKey(name: "is_moving") final bool? isMoving,
}) = BackgroundTypeWallpaper;