Utils class
Utilities class functions
Constructors
- Utils()
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 Properties
- currentState → CurrentState
-
It retrieves the current state in base of current device
no setter
- getIt → GetIt
-
It retrieves the GetIt instance
no setter
- instance ← CurrentState
-
no getter
Static Methods
-
chunksList<
T> (List< T> elements, int number) → List<List< T> > - Split a list in chunks
-
colorString(
Color color) → String - Utils function to retrieve the color hex value from a Color value
-
copy(
String text) → Future< void> - Utils function to copy on clipboard dynamic text
-
downloadFile(
String url, String fileName, String dir) → Future< String> - Utils functions to download a file
-
evalNumber(
String text) → int - Utils function to evaluate the number from custom string
-
generateRandomBoolean(
) → bool - It generates a random boolean value
-
getDateString(
DateTime datetime) → String - Utils function to retrieve the date string format from a DateTime object
-
iconData(
String key) → int - Utils function to retrieve the icon from the IconData dictionary
-
plotMinute(
int minute) → String - Utils function to the minute to show as a String
-
registerType<
T extends Object> (T instance) → void - Utils function to register any T instance with GetIt
-
roundDouble(
double value, int places) → double - Utils functions to round a double number to two decimal position
-
translatedText(
String key, {Map< String, dynamic> ? arguments, bool replaceAll = false}) → String - Utils function to retrieve the dynamic translated text in base of any key
-
validateRegex(
String regexString, dynamic value) → bool - Utils function to validate a regex with a dynamic value and a string