OpenWeatherByLocation constructor

const OpenWeatherByLocation({
  1. Key? key,
  2. required String apiKey,
  3. required double latitude,
  4. required double longitude,
  5. WeatherUnits weatherUnits = WeatherUnits.IMPERIAL,
  6. Color color = Colors.black,
  7. Languages language = Languages.ENGLISH,
})

Creates an OpenWeatherByLocation widget.

The apiKey, latitude, and longitude parameters are required. The weatherUnits defaults to WeatherUnits.IMPERIAL, color defaults to Colors.black, and language defaults to Languages.ENGLISH.

Implementation

const OpenWeatherByLocation({
  super.key,
  required this.apiKey,
  required this.latitude,
  required this.longitude,
  this.weatherUnits = WeatherUnits.IMPERIAL,
  this.color = Colors.black,
  this.language = Languages.ENGLISH,
});