LinearColorSwatch constructor
LinearColorSwatch(
- Color? _base, {
- double factor = 0.01,
- SwatchConfig swatchConfig = SwatchConfig.lighter,
- DyteColorSwatch? colorSwatch,
factor
decides the percentage by which the colors will be generated for the swatch.
Implementation
LinearColorSwatch(
this._base, {
double factor = 0.01,
SwatchConfig swatchConfig = SwatchConfig.lighter,
this.colorSwatch,
}) : assert(factor >= 0 && factor <= 1),
assert(!(_base == null && colorSwatch == null),
'base color or colorSwatch is required'),
_config = swatchConfig,
_factor = factor;