fromLocation static method
Obtain weather forecast data for the specified point by lat
,lng
.
During the process, the function may download area data and they can be cached
if you explicitly specify cacheDirectory
;
otherwise the function will download them each time it requires the data.
Implementation
static Future<Weather?> fromLocation({
required double lng,
required double lat,
String? cacheDirectory,
}) async {
final area = await findArea(lng: lng, lat: lat);
if (area == null) return null;
return await fromClass10Code(area.class10);
}