ColorUint4.fromList constructor

ColorUint4.fromList(
  1. List<int> color
)

Implementation

ColorUint4.fromList(List<int> color)
    : length = color.length,
      data = Uint8List(color.length < 3 ? 1 : 2) {
  setRgba(length > 0 ? color[0] : 0, length > 1 ? color[1] : 0,
      length > 2 ? color[2] : 0, length > 3 ? color[3] : 0);
}