CorePalette.fromList constructor
Create a CorePalette from a fixed-size list of ARGB color ints representing concatenated tonal palettes.
Inverse of asList.
Implementation
// ignore: sort_constructors_first
CorePalette.fromList(List<int> colors)
: assert(colors.length == size * TonalPalette.commonSize,
'colors length must be equal to size*commonSize'),
primary = TonalPalette.fromList(
_getPartition(colors, 0, TonalPalette.commonSize)),
secondary = TonalPalette.fromList(
_getPartition(colors, 1, TonalPalette.commonSize)),
tertiary = TonalPalette.fromList(
_getPartition(colors, 2, TonalPalette.commonSize)),
neutral = TonalPalette.fromList(
_getPartition(colors, 3, TonalPalette.commonSize)),
neutralVariant = TonalPalette.fromList(
_getPartition(colors, 4, TonalPalette.commonSize));