Coordinate.fromJson constructor

Coordinate.fromJson(
  1. List<double> json
)

Creates a Coordinate from a JSON List.

Example:

Coordinate.fromJson([1, 2]); // Coordinate(1, 2)

Implementation

factory Coordinate.fromJson(List<double> json) {
  return Coordinate(json[1], json[0]);
}