type 'int' is not a subtype of 'double' flutter even after using toInt()

In my app I’m converting a double temp by temp.toInt() to a late int temperature variable. But somehow my app crashes and showing me error saying "type ‘int’ is not a subtype of ‘double’". The main problem is it works suddenly. And then again it crashes. I don’t know why it’s happening. here is my… Read More type 'int' is not a subtype of 'double' flutter even after using toInt()