getTomorrowWeather static method

Future<WeatherInfo?> getTomorrowWeather({
  1. String city = '北京',
})

获取明天天气

Implementation

static Future<WeatherInfo?> getTomorrowWeather({
  String city = '北京',
}) async {
  final forecast = await getForecast(city: city, days: 3);
  if (forecast.length > 1) {
    return forecast[1]; // 返回明天的天气
  }
  return null;
}