toList method

List<Color> toList({
  1. bool includePrimary = true,
})

Returns the shade50 .. shade700 formed List<Color> from the MaterialAccentColor provided as this.

If includePrimary is true, an additional entry located at the beginning will have the value of this itself.
Default is true to differentiate versatility from asList.

Implementation

List<Color> toList({bool includePrimary = true}) => [
      if (includePrimary) this,
      shade50,
      shade100,
      shade200,
      shade400,
      shade700,
    ];