flutter-timer

Flutter: Timer can not stop

爱⌒轻易说出口 提交于 2021-01-07 01:31:31
问题 My code is below. I try to close this timer. timer could not close. What can I do to close this timer? I need help immediatly. Timer timerHttp; @override void initState() { timerHttp = Timer.periodic(new Duration(seconds: 10), (timerHttp) async { print("girdi yine asdadasd"); final response = await http.get( "http://xxxxxxxxxxxxxxxxxxxxxxxxx", ); if (response.statusCode == 200) { setState(() { var responseJson = json.decode(response.body); cm100Datas = responseJson; saat = []; l1voltState = [