Light constructor

Light(
  1. dynamic color, [
  2. double? intensity
])

Implementation

Light(color, [double? intensity]) : super() {
  if (color is Color) {
    this.color = color;
  } else if (color is int) {
    this.color = Color.fromHex(color);
  } else {
    throw ("Light init color type is not support $color ");
  }

  this.intensity = intensity ?? 1.0;
}