toMap static method

Map<String, dynamic> toMap(
  1. dynamic value
)

Converts value into map object or returns empty map when conversion is not possible

  • value the value to convert. Returns map object or empty map when conversion is not supported.

See toNullableMap

Implementation

static Map<String, dynamic> toMap(value) {
  var result = MapConverter.toNullableMap(value);
  return result ?? <String, dynamic>{};
}