mapFromJson static method

Map<String, NodePath> mapFromJson(
  1. Map<String, dynamic>? json
)

Implementation

static Map<String, NodePath> mapFromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return <String, NodePath>{};
  }

  return json.entries.fold(<String, NodePath>{},
      (Map<String, NodePath> previousValue, element) {
    final NodePath? object = NodePath.fromJson(element.value);
    if (object is NodePath) {
      previousValue[element.key] = object;
    }

    return previousValue;
  });
}