deepCastMap function

Map<String, dynamic> deepCastMap(
  1. Map map
)

Recursively converts a map produced by dart:js_interop's dartify() (typed Map<Object?, Object?>) into the Map<String, dynamic> shape used throughout the plugin. Nested maps and lists are converted as well.

Implementation

Map<String, dynamic> deepCastMap(Map<dynamic, dynamic> map) {
  return map.map((key, value) => MapEntry(key.toString(), deepCastValue(value)));
}