# Flutter 升级

Flutter 可以通过项目根目录(包含pubspec.yaml的目录)执行命令flutter upgrade升级。

Flutter channels共有4中release channel,输入命令flutter channel:

$ flutter channel
Flutter channels:
* master
  dev
  beta
  stable

*的表示当前channel为master,官方推荐使用stable,可以输入flutter channel stable切换:

$ flutter channel stable
$ flutter channel
Flutter channels:
  master
  dev
  beta
* stable

注意:pubspec.yaml 文件掌管flutter所需要的依赖,类似于nodejs的package.json。这些依赖包可以通过flutter package get获取。通过命令flutter package upgrade升级依赖包。