Open kingcoder321 opened 2 years ago
E/flutter ( 2741): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Invalid argument (onError): Error handler must accept one Object or one Object and a StackTrace as arguments.: Closure: (HttpException) => Null E/flutter ( 2741): #0 Stream.handleError (dart:async/stream.dart:666:7) E/flutter ( 2741): #1 IOClient.send (package:http/src/io_client.dart:52:55) E/flutter ( 2741): E/flutter ( 2741): #2 BaseClient._sendUnstreamed (package:http/src/base_client.dart:176:32) E/flutter ( 2741): E/flutter ( 2741): #3 _withClient (package:http/http.dart:166:12) E/flutter ( 2741): E/flutter ( 2741): #4 _HomeState.build. (package:recipe_app/views/home.dart:135:48) E/flutter ( 2741): E/flutter ( 2741):
i have found this error please help me to solve the problem
Try updating the http dependency in the pubspec.yaml to http: ^0.13.4. This is apparently a bug and updating should fix it.
pubspec.yaml
http: ^0.13.4
E/flutter ( 2741): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Invalid argument (onError): Error handler must accept one Object or one Object and a StackTrace as arguments.: Closure: (HttpException) => Null E/flutter ( 2741): #0 Stream.handleError (dart:async/stream.dart:666:7) E/flutter ( 2741): #1 IOClient.send (package:http/src/io_client.dart:52:55) E/flutter ( 2741):
E/flutter ( 2741): #2 BaseClient._sendUnstreamed (package:http/src/base_client.dart:176:32)
E/flutter ( 2741):
E/flutter ( 2741): #3 _withClient (package:http/http.dart:166:12)
E/flutter ( 2741):
E/flutter ( 2741): #4 _HomeState.build. (package:recipe_app/views/home.dart:135:48)
E/flutter ( 2741):
E/flutter ( 2741):
i have found this error please help me to solve the problem