numberOfChannels property Null safety

int numberOfChannels

The number of channels used by this Image. While all images are stored internally with 4 bytes, some images, such as those loaded from a Jpeg, don't use the 4th (alpha) channel.

Implementation

int get numberOfChannels => channels == Channels.rgba ? 4 : 3;