Dart DocumentationshadesInvalidColourFieldException

InvalidColourFieldException class

Exception thrown when a colour object validates and finds an out of range numeric value for an RGB(A) component

class InvalidColourFieldException implements Exception {
 
 String _message;
 
 InvalidColourFieldException(String field, int value) : _message = "Invalid field $field, expected range 0 to 255 inclusive but was $value";
 
 String toString() {
   return _message;
 }
 
}

Implements

Exception

Constructors

new InvalidColourFieldException(String field, int value) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
InvalidColourFieldException(String field, int value) : _message = "Invalid field $field, expected range 0 to 255 inclusive but was $value";

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() {
 return _message;
}