BackgroundSpec constructor
const
BackgroundSpec({
- required BackgroundKind kind,
- required List<
int> colors, - int angleTenths = 0,
- BackgroundPattern pattern = BackgroundPattern.none,
- int patternColor = 0,
- int patternScaleCdp = 0,
- int patternOpacityPermille = 0,
- int driftPeriodMs = 0,
colors must be unmodifiable (a const literal, or wrapped with
List.unmodifiable): specs are deeply immutable and cache their
stable hash. The generator, copyWith and fromJson all comply.
Implementation
const BackgroundSpec({
required this.kind,
required this.colors,
this.angleTenths = 0,
this.pattern = BackgroundPattern.none,
this.patternColor = 0,
this.patternScaleCdp = 0,
this.patternOpacityPermille = 0,
this.driftPeriodMs = 0,
});