flutter packages pub run json_model报错

报错信息:

Failed to precompile json_model:json_model:
an 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,
       ^
/D:/flutter/flutter_windows_v1.7.8+hotfix.4-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.1.0/lib/src/multi_headers.dart:129:8: Error: The method 'MultiHeaders.set' has fewer named arguments than 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

解决方案:

flutter pub upgrade

你可能感兴趣的:(flutter packages pub run json_model报错)