CurrentWeatherFactory constructor

CurrentWeatherFactory(
  1. {required String apiKey,
  2. Language language = Language.ENGLISH,
  3. required UnitSettings settings,
  4. LocationCoords? locationCoords,
  5. String? cityName,
  6. Duration maxTimeBeforeTimeout = const Duration(seconds: 3)}
)

Implementation

CurrentWeatherFactory({
  required this.apiKey,
  this.language = Language.ENGLISH,
  required this.settings,
  this.locationCoords,
  this.cityName,
  this.maxTimeBeforeTimeout = const Duration(seconds: 3),
}) : assert(
        (cityName != null && locationCoords == null) ||
            (cityName == null && locationCoords != null),
        "A city name or an instance of LocationCoords must be provided, but both cannot be used to query at the same time",
      );