fromJson static method

ClosedVectorPath? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

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

  return ClosedVectorPath(
    commands: List<VectorPathCommand>.from(
      tdListFromJson(json['commands'])
          .map((item) => VectorPathCommand.fromJson(tdMapFromJson(item)))
          .whereType<VectorPathCommand>(),
    ),
  );
}