在你的应用程序根目录(包含pubspec.yaml文件的目录)中运行flutter upgrade 命令:
pubspec.yaml
flutter upgrade
$ flutter upgrade