Converter class

A utility class for various conversion operations. Provides methods for modifying and converting values.

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

asString(List<String> list) String
Converts a list of strings to a formatted string.
modify() String
Modifies a value (placeholder function).
toCountingNumber(List? list) int
Converts a list to a counting number.
toCountingState(int current, int total, [String separator = "/"]) String
Converts current and total values to a counting state string.
toCountingText(List? list) String
Converts a list to a counting text.
toCountingWithPlus(int size, int limit) String
Converts a size and limit to a formatted string with a plus sign if size is greater than limit.
toDigitWithLetter(String? value) String
Converts a string to contain only digits and letters.
toDigitWithPlus(String? value) String
Converts a string to contain only digits and a plus sign.
toDouble(dynamic value) double
Converts a value to a double.
toInt(dynamic value) int
Converts a value to an integer.
toKMB(int counter, String singularName, String pluralName, [NumberUnits unit = NumberUnits.auto]) String
Converts a counter value to a formatted string with unit.
toKMBFromList(List list, String singularName, String pluralName, [NumberUnits unit = NumberUnits.auto]) String
Converts the length of a list to a formatted string with unit.
toLetter(String? value) String
Converts a string to contain only letters.
toList<T>({List? list, String? value, String regex = ","}) List<T>
Converts a comma-separated string or list to a list of a specified type.
toMail(String prefix, String suffix, [String type = "com"]) String?
Converts prefix, suffix, and type to a formatted email address.
toNumeric(String? value, [bool onlyDigit = false]) String
Converts a string to contain only numeric characters.
toPathSegments(String path) List<String>
Converts a path string to a list of path segments.
toReversedList<T>(List<T> list) List<T>
Converts a list to a reversed list.
toSet<T>(List<T> list) Set<T>?
Converts a list to a set.
toUri(String url) Uri
Converts a string to a Uri.
toUserName(String name, {List<String>? regexList, List<String>? replacements}) String
Converts a username by applying regex and replacements.
toValue<T>(dynamic value) → T?
Converts a value to the specified type.