0

enter image description here

  flutter upgrade
Building flutter tool...
Running pub upgrade...
Resolving dependencies... (8.1s)
Got dependencies.
AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/lib/src/base_request.dart:144:7: Error: The getter 'drethrow' isn't defined for the class 'BaseRequest'.
 - 'BaseRequest' is from 'package:http/src/base_request.dart' ('AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/lib/src/base_request.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'drethrow'.
      drethrow;
      ^^^^^^^^
AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/lib/src/base_request.dart:129:28: Error: A non-null value must be returned since the return type 'StreamedResponse' doesn't allow null.
 - 'StreamedResponse' is from 'package:http/src/streamed_response.dart' ('AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/lib/src/streamed_response.dart').
  Future<StreamedResponse> send() async {
                           ^
Error: Unable to create dart snapshot for flutter tool.

I wanted to update Flutter when I ran into this problem. And I can't run my project at all, as if Flutter was not installed at all

I want to be able to update and output

1 Answer 1

0

You were most probably looking at the source code of the http package the dart pub tool downloaded to your computer and accidentally pressed a d on your keyboard in AppData/Local/Pub/Cache/hosted/pub.dev/http-0.13.6/lib/src/base_request.dart on line 144 and this made the code incompilable. Go to this file and remove the d or run dart pub cache repair to redownload all the packages in your pub cache.

Try correcting the name to the name of an existing getter, or defining a getter or field named 'drethrow'.
      drethrow;
      ^^^^^^^^

The cause was clearly stated in the error you were getting.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.