CurrentWeatherFactory constructor
CurrentWeatherFactory(
- {required String apiKey,
- Language language = Language.ENGLISH,
- required UnitSettings settings,
- LocationCoords? locationCoords,
- String? cityName,
- 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",
);