hasPalette property
bool
get
hasPalette
True if the image has a palette. If the image has a palette, then the image data has 1 channel for the palette index of the pixel.
Implementation
bool get hasPalette => palette != null;