TypeParser class

Lenient parsers for basic Dart types.

Constructors

TypeParser()

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

parseBigInt(Object? value, [BigInt? def]) BigInt?
Tries to parse a BigInt.
parseBool(Object? value, [bool? def]) bool?
Tries to parse a bool.
parseDateTime(Object? value, [DateTime? def]) DateTime?
Tries to parse a DateTime.
parseDouble(Object? value, [double? def]) double?
Tries to parse a double.
parseInt(Object? value, [int? def]) int?
Tries to parse an int.
parseList<T>(Object? value, {List<T>? def, TypeElementParser<T>? elementParser}) List<T>?
Tries to parse a List.
parseMap<K, V>(Object? value, {Map<K, V>? def, TypeElementParser<K>? keyParser, TypeElementParser<V>? valueParser}) Map<K, V>?
Tries to parse a Map.
parseMapEntry<K, V>(Object? value, {MapEntry<K, V>? def, TypeElementParser<K>? keyParser, TypeElementParser<V>? valueParser}) MapEntry<K, V>?
Tries to parse a MapEntry.
parseNum(Object? value, [num? def]) num?
Tries to parse a num.
parserFor<T>({Object? obj, Type? type}) TypeElementParser?
Returns the parser for the desired type, defined by T, obj or type.
parseSet<T>(Object? value, {Set<T>? def, TypeElementParser<T>? elementParser}) Set<T>?
Tries to parse a Set.
parseString(Object? value, [String? def]) String?
Tries to parse a String.
registerParserResolver(TypeParserResolver parserResolver) → void
unregisterParserResolver(TypeParserResolver parserResolver) bool