ColumnConverter class

Utility functions to convert dynamic columns in tables to typed columns

Constructors

ColumnConverter()

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

isBool(dynamic v, {List<String> trues = const ['true', 'True'], List<String> falses = const ['false', 'False']}) bool
isBools(Iterable list, {List<String> trues = const ['true', 'True'], List<String> falses = const ['false', 'False']}) bool
Checks that if List list can be a List<bool>
isDateTime(dynamic v, {String format = defDateTimeFormat, String? locale, bool isUtc = false}) bool
isDateTimes(Iterable list, {String format = defDateTimeFormat, String? locale, bool isUtc = false}) bool
isDouble(dynamic v) bool
isDoubles(Iterable list) bool
Checks that if List list can be a List<double>
isInt(dynamic v) bool
isInts(Iterable list) bool
Checks that if List list can be a List<int>
isNum(dynamic v) bool
isNums(Iterable list) bool
Checks that if List list can be a List<num>
toBool(dynamic v, {List<String> trues = const ['true', 'True'], List<String> falses = const ['false', 'False'], bool? defaultValue}) bool?
toBools(Iterable list, {List<String> trues = const ['true', 'True'], List<String> falses = const ['false', 'False'], bool? defaultValue}) Iterable<bool?>
toDateTime(dynamic v, {String format = defDateTimeFormat, String? locale, bool isUtc = false, DateTime? defaultValue}) DateTime?
toDateTimes(Iterable list, {String format = defDateTimeFormat, String? locale, bool isUtc = false, DateTime? defaultValue}) Iterable<DateTime?>
toDouble(dynamic v, {double? defaultValue}) double?
toDoubles(Iterable list, {double? defaultValue}) Iterable<double?>
toInt(dynamic v, {int? defaultValue}) int?
toInts(Iterable list, {int? defaultValue}) Iterable<int?>
toNum(dynamic v, {num? defaultValue}) num?
toNums(Iterable list, {num? defaultValue}) Iterable<num?>
toStrings(Iterable list, {String? defaultValue}) Iterable<String?>

Constants

defDateTimeFormat → const String