ColorPalette.opposites constructor

ColorPalette.opposites(
  1. ColorPaletteBase<dynamic, ColorModel> colorPalette, {
  2. bool insertOpposites = true,
  3. bool growable = true,
  4. bool unique = false,
})

Generates a ColorPalette from colorPalette by appending or inserting the opposite colors of every color in colorPalette.

Note: Use the opposite methods to flip every color in a palette to their respective opposites without preserving the original colors.

colorPalette must not be null.

If insertOpposites is true, the generated colors will be inserted into the list of colors after their respective base colors. If false, the generated colors will be appended to the end of the list. insertOpposites defaults to true and must not be null.

Implementation

factory ColorPalette.opposites(
  cp.ColorPaletteBase colorPalette, {
  bool insertOpposites = true,
  bool growable = true,
  bool unique = false,
}) {
  return ColorPalette(_cast(
    cp.ColorPalette.opposites(
      colorPalette,
      insertOpposites: insertOpposites,
    ),
    growable: growable,
    unique: unique,
  ));
}