Closed Ankur-Khandelwal closed 4 years ago
Whenever I try to get the weather for other cities, I am getting the following error:
E/flutter (20167): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: Class 'int' has no instance method '[]'. E/flutter (20167): Receiver: 401 E/flutter (20167): Tried calling: E/flutter (20167): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) E/flutter (20167): #1 _LocationScreenState.updateUI. (package:clima/screens/location_screen.dart:45:32) E/flutter (20167): #2 State.setState (package:flutter/src/widgets/framework.dart:1240:30) E/flutter (20167): #3 _LocationScreenState.updateUI (package:clima/screens/location_screen.dart:36:5) E/flutter (20167): #4 _LocationScreenState.build. (package:clima/screens/location_screen.dart:103:25) E/flutter (20167): E/flutter (20167): #5 _LocationScreenState.build. (package:clima/screens/location_screen.dart) E/flutter (20167): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19) E/flutter (20167): #7 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:1098:38) E/flutter (20167): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24) E/flutter (20167): #9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11) E/flutter (20167): #10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5) E/flutter (20167): #11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7) E/flutter (20167): #12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9) E/flutter (20167): #13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12) E/flutter (20167): #14 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:124:9) E/flutter (20167): #15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8) E/flutter (20167): #16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18) E/flutter (20167): #17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7) E/flutter (20167): #18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19) E/flutter (20167): #19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22) E/flutter (20167): #20 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7) E/flutter (20167): #21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7) E/flutter (20167): #22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7) E/flutter (20167): #23 _rootRunUnary (dart:async/zone.dart:1206:13) E/flutter (20167): #24 _CustomZone.runUnary (dart:async/zone.dart:1100:19) E/flutter (20167): #25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7) E/flutter (20167): #26 _invoke1 (dart:ui/hooks.dart:267:10) E/flutter (20167): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5) E/flutter (20167):
Fixed by commits - 8945a69cfb07395bf63beab67be0f9245d2d219d and 6b60d89ee2f9c53492a545306de7f15da4c723e8
Whenever I try to get the weather for other cities, I am getting the following error:
E/flutter (20167): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: Class 'int' has no instance method '[]'. E/flutter (20167): Receiver: 401 E/flutter (20167): Tried calling: E/flutter (20167): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) E/flutter (20167): #1 _LocationScreenState.updateUI. (package:clima/screens/location_screen.dart:45:32)
E/flutter (20167): #2 State.setState (package:flutter/src/widgets/framework.dart:1240:30)
E/flutter (20167): #3 _LocationScreenState.updateUI (package:clima/screens/location_screen.dart:36:5)
E/flutter (20167): #4 _LocationScreenState.build. (package:clima/screens/location_screen.dart:103:25)
E/flutter (20167):
E/flutter (20167): #5 _LocationScreenState.build. (package:clima/screens/location_screen.dart)
E/flutter (20167): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
E/flutter (20167): #7 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:1098:38)
E/flutter (20167): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
E/flutter (20167): #9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
E/flutter (20167): #10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
E/flutter (20167): #11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7)
E/flutter (20167): #12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9)
E/flutter (20167): #13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12)
E/flutter (20167): #14 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:124:9)
E/flutter (20167): #15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (20167): #16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18)
E/flutter (20167): #17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7)
E/flutter (20167): #18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19)
E/flutter (20167): #19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
E/flutter (20167): #20 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
E/flutter (20167): #21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
E/flutter (20167): #22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
E/flutter (20167): #23 _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (20167): #24 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (20167): #25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (20167): #26 _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter (20167): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
E/flutter (20167):