convertToDart function

dynamic convertToDart(
  1. dynamic value
)

Implementation

dynamic convertToDart(value) {
  // Value types.
  if (value == null) return null;
  if (value is bool || value is num || value is DateTime || value is String) return value;

  // JsArray.
  if (value is Iterable) return value.map(convertToDart).toList();
  return jsToMap(value);
}