赞
踩
https://github.com/fluttertools/fvm/releases
export PATH="../fvm:$PATH"
1. 'win + r' 输入 regedit
2. 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
3. 新建字符串 'AutoRun=D:\Software\FVM\Script\fvm_help.bat'
4. fvm_help.bat内容如下:
@echo off
doskey flutter=fvm flutter $*
doskey dart=fvm dart $*
FVM_CACHE_PATH=D:\Software\FVM\CACHE
fvm --version --- 检查fvm版本
fvm config --- 查看配置
fvm releases --- 查看现有远程版本
fvm list --- 查看当前安装的flutter版本
fvm install xxx --- 安装指定的flutter版本
fvm flutter doctor --- 检测flutter配置
fvm use xxx --- 为当前项目指定flutter版本
fvm global --- 指定全局flutter版本
fvm remove xxx --- 删除flutter版本
fvm flutter xxx --- 执行flutter指令需要在前面加上fvm
// settings.json 添加如下配置
"dart.flutterSdkPaths": [
"fvm/CACHE/default"
],
"dart.flutterSdkPath": "fvm/CACHE/default",
export JAVA_HOME="../Android/Studio/jbr"
export ANDROID_HOME="../Android/SDK" // 只需要配置ANDROID_HOME即可
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
export FLUTTER_GIT_URL="https://kgithub.com/flutter/flutter.git" // 用于消除github代理警告
export CHROME_EXECUTABLE="../google/chrome/google-chrome-stable" // 如果系统找不到谷歌浏览器可以这样配置
export PUB_HOSTED_URL="https://pub.flutter-io.cn"
export FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn"
git config --global url."https://kgithub.com/".insteadOf "https://github.com/"
"dart.flutterSdkPaths": [
"../fvm/versions"
]
buildscript {
repositories {
// 找到这里. 加入以下镜像代理
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
// end
google()
mavenCentral()
}
}
buildscript { ext.kotlin_version = '1.7.10' repositories { // 找到这里. 加入以下镜像代理 maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/google' } // end google() mavenCentral() } } allprojects { repositories { // 找到这里. 加入以下镜像代理 maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/google' } // end google() mavenCentral() } }
打开命令面板 > 输入 SDK > 找到 Flutter: Change SDK 选择对应版本的 flutter即可
Flutter
Flutter Tree - 简化的语法创建所需的widget树
Error Lens - 扩展突出显示了代码中的错误行,并在行尾附加了错误细节
Dart Data Class Generator - 帮助生成构造函数等
Flutter Stylizer - 统一格式化
Better Comments - TODO 颜色提示
Color Highlight - 颜色高亮
JSON to Dart Model - json转dart
Flutter Widget Snippets
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。