【发布时间】:2019-05-23 11:43:03
【问题描述】:
大家好,我正在尝试构建一个颤振来显示纬度和经度,但我仍然收到错误代码:
void initState(){
super.initState();
//Default variable set 0
currentLocation['latitude'] = 0.0;
currentLocation['longtitude'] = 0.0;
initPlatformState();
locationSubscription = location.onLocationChanged.listen((Map<String, double> result){
setState(() {
currentLocation = result;
});
});
}
【问题讨论】:
标签: android dart flutter listen