QTypeConversion class
Comprehensive type conversion utilities for QUtils
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
-
bytesToHuman(
int bytes, {int decimals = 2}) → String - Converts bytes to a human-readable string
-
humanToBytes(
String sizeString) → int? - Converts a human-readable size string to bytes
-
toBoolSafe(
dynamic value, [bool? fallback]) → bool? - Safely converts a dynamic value to a boolean
-
toDoubleSafe(
dynamic value, [double? fallback]) → double? - Safely converts a dynamic value to a double
-
toIntSafe(
dynamic value, [int? fallback]) → int? - Safely converts a dynamic value to an integer
-
toListSafe<
T> (dynamic value, {String delimiter = ',', List< T> ? fallback}) → List<T> ? - Safely converts a dynamic value to a List
-
toMapSafe<
K, V> (dynamic value, [Map< K, V> ? fallback]) → Map<K, V> ? - Safely converts a dynamic value to a Map
-
toNumSafe(
dynamic value, [num? fallback]) → num? - Safely converts a dynamic value to a num
-
toStringSafe(
dynamic value, [String? fallback]) → String? - Safely converts a dynamic value to a string