Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter build command is not working getting error

Tags:

build

flutter

i run this command in flutter: "flutter pub run build_runner watch" it is happening only in one project and rest all fine

error :

../../flutter-dart/flutter/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.1.0/lib/src/multi_headers.dart:97:8: Error: The method 'MultiHeaders.add' has fewer named arguments tha
n those of overridden method 'HttpHeaders.add'.
  void add(String name, Object value) {
       ^
org-dartlang-sdk:///sdk/lib/_http/http.dart:694:8: Context: This is the overridden method ('add').
  void add(String name, Object value,
       ^
../../flutter-dart/flutter/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.1.0/lib/src/multi_headers.dart:129:8: Error: The method 'MultiHeaders.set' has fewer named arguments th
an those of overridden method 'HttpHeaders.set'.
  void set(String name, Object value) {
       ^
org-dartlang-sdk:///sdk/lib/_http/http.dart:703:8: Context: This is the overridden method ('set').
  void set(String name, Object value,
       ^
pub finished with exit code 1
like image 961
user11482692 Avatar asked Aug 27 '26 15:08

user11482692


1 Answers

I guess you have upgraded flutter to the latest version.You should run the following command and also check pubspec.yaml file if build_runner is at the latest version, at this very writing time which is 1.8.1,you can check the latest version here.

flutter pub upgrade
like image 148
zionpi Avatar answered Aug 30 '26 07:08

zionpi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!