brightness property

double get brightness

Brightness percentage.

Range: 0 - 100

Value cannot be 0, writing 0 changes it to lowest possible brightness.

Throws PercentageException if brightness is set to something outside of the range 0 to 100 (inclusive).

Implementation

double get brightness => _brightness;
set brightness (double brightness)

Implementation

set brightness(double brightness) {
  if (Validators.isValidPercentage(brightness)) {
    _brightness = brightness;
  } else {
    throw PercentageException.withValue(brightness);
  }
}