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
You were most probably looking at the source code of the
http
package thedart
pub tool downloaded to your computer and accidentally pressed a d on your keyboard inAppData/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 thed
or rundart pub cache repair
to redownload all the packages in your pub cache.The cause was clearly stated in the error you were getting.