PaletteEntry constructor

PaletteEntry(
  1. String name,
  2. Paint paint, {
  3. Vector2? offset,
  4. int? priority,
  5. bool? enabled,
})

Creates a named paint entry, to be registered with Palette.add.

Implementation

PaletteEntry(
  String this.name,
  this.paint, {
  Vector2? offset,
  int? priority,
  bool? enabled,
}) : offset = offset ?? .zero,
     _priority = priority ?? 0,
     enabled = enabled ?? true;