Flutter学习之常用命令

  • VSCode中创建项目命令
sudo flutter create flutter_demo
  • 项目下建文件夹命令
  • MacOS
 mkdir -p assets/image
 mkdir -p lib/page
 mkdir -p lib/models
 mkdir -p lib/utils
 mkdir -p lib/widgets
 mkdir -p lib/service
  • Windows
 mkdir  assets/image
 mkdir  lib/page
 mkdir  lib/models
 mkdir  lib/utils
 mkdir  lib/widgets
 mkdir  lib/service
  • 运行
 flutter run
  • 热重载
 r
  • 显示框架
 p
  • 打包
flutter build web
  • 检查环境
 flutter doctor
  • 查看版本
 flutter --version
  • 升级环境
 flutter upgrade
  • 检查当前环境
 flutter channel
  • 切换环境
 flutter channel $环境名
  • 获取flutter packages
 flutter packages get

你可能感兴趣的:(Flutter,flutter)