getCoordinates function Null safety

Map<String, double> getCoordinates()

Implementation

Map<String, double> getCoordinates() {
  final selected = _coordinates[_rand.nextInt(_coordinates.length)].split(',');
  return {'lat': double.parse(selected[0]), 'lng': double.parse(selected[1])};
}