tryFromMap static method
- JsonMap map
Creates Coords from a map, returning null if data is invalid. Use this when you want to gracefully handle invalid data.
Implementation
static Coords? tryFromMap(JsonMap map) {
try {
return Coords.fromMap(map);
} on InvalidCoordsException {
return null;
}
}