setPalette method
Sets the palette used for coloring.
Implementation
void setPalette(Palette palette) {
this.palette = palette;
particles
.where((p) => p != null)
.forEach((p) => p!.color = Rnd.getItem(palette.colors!));
}
Sets the palette used for coloring.
void setPalette(Palette palette) {
this.palette = palette;
particles
.where((p) => p != null)
.forEach((p) => p!.color = Rnd.getItem(palette.colors!));
}