LevelPalette class

Piece and board colors used for one level.

The board colors are optional; when null the base theme's colors are kept.

Constructors

LevelPalette({required TetrominoColors pieces, Color? boardBackground, Color? boardBorderColor, Color? gridLineColor, Color? panelBackground})
const
LevelPalette.fromFills(Map<TetrominoType, Color> fills, {Color? boardBackground, Color? boardBorderColor, Color? gridLineColor, Color? panelBackground})
Builds a palette from piece fill colors; borders are darker shades of the fills.
factory

Properties

boardBackground → Color?
final
boardBorderColor → Color?
final
gridLineColor → Color?
final
hashCode → int
The hash code for this object.
no setterinherited
panelBackground → Color?
final
pieces → TetrominoColors
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyTo(TetrisTheme base, {bool recolorBoard = true}) → TetrisTheme
Returns base with this palette applied. When recolorBoard is false only the piece colors change.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

classic → List<LevelPalette>
Ten dark palettes, one per level, cycling like classic Tetris.
final