Convert class

A set of methods for converting values

Constructors

Convert()

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

toBoolean(dynamic d, bool def) bool
Converts to not-nullable boolean
toBooleanN(dynamic d) bool?
Converts to nullable boolean
toDateTime(dynamic d, DateTime def, {TimeUnit unit = TimeUnit.seconds}) DateTime
Converts to not-nullable DateTime
toDateTimeN(dynamic d, {TimeUnit unit = TimeUnit.seconds}) DateTime?
Converts to nullable DateTime
toDouble(dynamic d, double def) double
Converts to not-nullable double
toDoubleN(dynamic d) double?
Converts to nullable double
toInt(dynamic d, int def) int
Converts to not-nullable int
toIntN(dynamic d) int?
Converts to nullable int
toList<T>(dynamic d, List<T> def) List<T>
Converts to not-nullable list
toListN<T>(dynamic d) List<T>?
Converts to nullable list
toListOfDouble(dynamic d) List<double>
Converts to not-nullable list of doubles from dynamic
toListOfInt(dynamic d) List<int>
Converts to not-nullable list of integers from dynamic
toListOfString(dynamic d) List<String>
Converts to not-nullable list of strings from dynamic
toMap<T1, T2>(dynamic d, Map<T1, T2> def) Map<T1, T2>
Converts to not-nullable map
toMapN<T1, T2>(dynamic d) Map<T1, T2>?
Converts to nullable map
toMapOfStringDouble(dynamic d, Map<String, double> def) Map<String, double>
Converts to not-nullable map of <String, double> from dynamic
toMapOfStringDoubleN(dynamic d) Map<String, double>?
Converts to nullable map of <String, double> from dynamic
toMapOfStringString(dynamic d, Map<String, String> def) Map<String, String>
Converts to not-nullable map of <String, String> from dynamic
toMapOfStringStringN(dynamic d) Map<String, String>?
Converts to nullable map of <String, String> from dynamic
toStr(dynamic d, String def) String
Converts to not-nullable String
toStrN(dynamic d) String?
Converts to nullable String