getStop method Null safety

Stop? getStop(
  1. String stopId
)

Implementation

Stop? getStop(String stopId) {
  if (_stops == null) {
    return null;
  }

  return _stops!.containsKey(stopId) ? Stop.fromJson(_stops![stopId]) : null;
}