getSatellite method

Satellite? getSatellite(
  1. String id
)

Gets a satellite by its id.

Returns null if no satellite with the given id is found.

Example usage:

final satellite = controller.getSatellite('iss');

Implementation

Satellite? getSatellite(String id) {
  try {
    return satellites.firstWhere((element) => element.id == id);
  } catch (_) {
    return null;
  }
}