1、需要在 pubspec.yaml 中引入 http: ^0.12.0
http: ^0.12.0
2、在终端执行命令 flutter packages upgrade
flutter packages upgrade