StringToHex class
A powerful conversion of String or/and Hash to HEX.
It returns a unique HEX, or a unique int of Color()
per provided String/hash.
It's provided two methods toHexString and toColor, which return a Hex-String, or respectively.
Constructors
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
-
toColor(
dynamic str) → int -
Return a int of 'bit hex':
Its return is proper to use as hex
color int
in a Color() For example:... color: Color(StringToHex().toColor('a nice String')) ...
then it'll generate and fill a hex-color int in it. return a hex-color. i.e: 0xFF353535 or: 8787451701 -
toHexString(
dynamic str) → String - Return a String of 'bit hex': Its return is proper to your custom manipulating (as you lik better 🧑💻). Returns a String HEX with prefix '0xFF' i.e: '0xFF343434'