GitHubColour class final

A class for getting GitHub language colour.

Since 2.0.0, GitHubColour implemented ColorSwatch that getting colour can be more convenience. And serval old API will be Deprecated.

Inheritance
Implemented types

Properties

alpha int
The alpha channel of this color in an 8 bit value.
no setteroverride
blue int
The blue channel of this color in an 8 bit value.
no setteroverride
entries Iterable<MapEntry<String, Color>>
The map entries of this.
no setterinherited
green int
The green channel of this color in an 8 bit value.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether there is no key/value pair in the map.
no setterinherited
isNotEmpty bool
Whether there is at least one key/value pair in the map.
no setterinherited
keys Iterable<String>
The keys of this.
no setteroverride
length int
The number of key/value pairs in the map.
no setterinherited
opacity double
The alpha channel of this color as a double.
no setteroverride
red int
The red channel of this color in an 8 bit value.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
A 32 bit value representing this color.
no setteroverride
values Iterable<Color>
The values of this.
no setterinherited

Methods

addAll(Map<String, Color> other) → void
This operation is not supported by an unmodifiable map.
inherited
addEntries(Iterable<MapEntry<String, Color>> entries) → void
This operation is not supported by an unmodifiable map.
inherited
cast<RK, RV>() Map<RK, RV>
Provides a view of this map as having RK keys and RV instances, if necessary.
inherited
clear() → void
This operation is not supported by an unmodifiable map.
inherited
computeLuminance() double
Returns a brightness value between 0 for darkest and 1 for lightest.
override
containsKey(Object? key) bool
Whether this map contains the given key.
inherited
containsValue(Object? value) bool
Whether this map contains the given value.
inherited
forEach(void action(String key, Color value)) → void
Applies action to each key/value pair of the map.
inherited
map<K2, V2>(MapEntry<K2, V2> transform(String key, Color value)) Map<K2, V2>
Returns a new map where all entries of this map are transformed by the given convert function.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putIfAbsent(String key, Color ifAbsent()) Color
This operation is not supported by an unmodifiable map.
inherited
remove(Object? key) Color?
This operation is not supported by an unmodifiable map.
inherited
removeWhere(bool test(String key, Color value)) → void
This operation is not supported by an unmodifiable map.
inherited
toString() String
A string representation of this object.
inherited
update(String key, Color update(Color value), {Color ifAbsent()?}) Color
This operation is not supported by an unmodifiable map.
inherited
updateAll(Color update(String key, Color value)) → void
This operation is not supported by an unmodifiable map.
inherited
withAlpha(int a) Color
Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).
override
withBlue(int b) Color
Returns a new color that matches this color with the blue channel replaced with b (which ranges from 0 to 255).
override
withGreen(int g) Color
Returns a new color that matches this color with the green channel replaced with g (which ranges from 0 to 255).
override
withOpacity(double opacity) Color
Returns a new color that matches this color with the alpha channel replaced with the given opacity (which ranges from 0.0 to 1.0).
override
withRed(int r) Color
Returns a new color that matches this color with the red channel replaced with r (which ranges from 0 to 255).
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Object? key) Color
Resolve key as language and find repersented Color from providers.
override
operator []=(String key, Color value) → void
This operation is not supported by an unmodifiable map.
inherited

Static Methods

getExistedInstance() GitHubColour
Get constructed instance which called initialize early.
getInstance({bool offlineLastResort = true}) Future<GitHubColour>
Perform initialize and return GitHubColour.
initialize({bool offlineLastResort = true}) Future<void>
Construct an instance of GitHubColour.