Validators class

Used throughout the app to validate data.

Constructors

Validators()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isUnitInterval(num num) bool
Returns true if the given num is between 0 and 1 (inclusive).
isValidGradient(List<LightColorXy>? points) bool
Used when finalizing a gradient to send with PUT or POST.
isValidGradientDraft(List<LightColorXy>? points) bool
Used to verify that the gradient is valid to be used as a draft.
isValidId(String id) bool
Returns true if the given id conforms to the proper regex pattern.
isValidIdV1(String idV1) bool
Returns true if the given idV1 conforms to the proper regex pattern or if it is empty.
isValidIpAddress(String ipAddress) bool
Returns true if the given ipAddress conforms to the proper regex pattern.
isValidLatitude(double latitude) bool
Returns true if the given latitude is between -90 and 90 (inclusive).
isValidLongitude(double longitude) bool
Returns true if the given longitude is between -180 and 180 (inclusive).
isValidMacAddress(String macAddress) bool
Returns true if the given macAddress conforms to the proper regex pattern.
isValidMired(int mired) bool
Returns true if the given mired is between 153 and 500 (inclusive).
isValidMirek(int mirek) bool
Returns true if the given mirek is between 153 and 500 (inclusive).
isValidName(String name) bool
Returns true if the length of name is between 1 and 32 characters (inclusive).
isValidPercentage(num percentage) bool
Returns true if the given percentage is between 0 and 100 (inclusive).
isValidScriptId(String scriptId) bool
Returns true if the given scriptId conforms to the proper regex pattern.
isValidScriptVersion(String scriptVersion) bool
Returns true if the given scriptVersion conforms to the proper regex pattern.
isValidSoftwareVersion(String softwareVersion) bool
Returns true if the given softwareVersion conforms to the proper regex pattern.
isValidValue<T>(T value, List<T> validValues) bool
Returns true if the the given value is found within validValues or if the validValues list is empty and value is empty as well.