RecursiveMapConverter class

Converts arbitrary values into map objects using extended conversion rules. This class is similar to MapConverter, but is recursively converts all values stored in objects and arrays.

Example

var value1 = RecursiveMapConverted.toNullableMap('ABC'); // Result: null
var value2 = RecursiveMapConverted.toNullableMap({ 'key': 123 }); // Result: { 'key': 123 }
var value3 = RecursiveMapConverted.toNullableMap([1,[2,3]); // Result: { '0': 1, { '0': 2, '1': 3 } }

Constructors

RecursiveMapConverter()

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

toMap(dynamic value) → dynamic
Converts value into map object or returns empty map when conversion is not possible
toMapWithDefault(dynamic value, Map<String, dynamic> defaultValue) → dynamic
Converts value into map object or returns default when conversion is not possible
toNullableMap(dynamic value) → dynamic
Converts value into map object or returns null when conversion is not possible.