════════小部件库捕获到异常══════════════════════════════════ ═════════════════════ 在构建Builder时引发了以下NoSuchMethodError: 方法'[]'在null上被调用。 接收者:null 尝试致电:
相关的引起错误的小部件是: MaterialApp文件:/// C:/Users/Ahmed/AndroidStudioProjects/weather_app/lib/main.dart:9:12 引发异常时,这是堆栈:
在#1
df['mean'] = df[fiveyear].sum(1, min_count=len(fiveyear))/len(fiveyear)
在#4
`void UpdateUI(dynamic weatherdata){
setState(() {
double temp = weatherdata['main']['temp'];
temperature = temp.toInt();
var condition = weatherdata['weather'][0]['id'];
weatherIcon = weather.getWeatherIcon(condition);
weatherDescription = weather.getMessage(temperature);
cityname = weatherdata['name'];
});
}`
我正尝试从下面的此API链接获取数据 https://samples.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=50228b366a46bef0c96ee6e6cecd4b6a