Open hhstore opened 3 years ago
// To install: + 更新
pub global activate get_cli
# 创建一个工程:
// To create a flutter project in the current directory:
// Note: By default it will take the folder's name as project name
// You can name the project with `get create project:my_project`
// If the name has spaces use `get create project:"my cool project"`
get create project
// To generate the chosen structure on an existing project:
get init
flutter run -d chrome --web-renderer html
flutter run -d chrome --web-renderer html --profile
flutter build web --release
# 指定 html 发布:
flutter build web --release --web-renderer html
# 不要使用canvaskit, 会导致首屏加载极慢
flutter build web --web-renderer canvaskit --release
dhttpd --path build/web/ # Serves app at http://localhost:8080
ngrok http -auth="user:password" file:///Users/alan/share
--dart-define=FLUTTER_WEB_CANVASKIT_URL=https://unpkg.zhimg.com/canvaskit-wasm@0.24.0/bin/
--dart-define=FLUTTER_WEB_CANVASKIT_URL=https://npm.elemecdn.com/canvaskit-wasm@0.24.0/bin/
--dart-define=FLUTTER_WEB_CANVASKIT_URL=https://cdn.jsdelivr.net/npm/canvaskit-wasm@0.24.0/bin/
# 去掉无用的包:
# cupertino_icons: ^1.0.2
flutter build web --release --web-renderer canvaskit --dart-define=FLUTTER_WEB_CANVASKIT_URL=https://cdn.jsdelivr.net/npm/canvaskit-wasm@0.24.0/bin/
flutter build web --release --web-renderer html --base-href /toolbox/ # fix baseHref
flutter build web --release --web-renderer html --base-href /issuer/ --dart-define=GITHUB_API_TOKEN=${{secrets.commit_secret}} # fix baseHref
flutter run --debug -d chrome --web-renderer html --dart-define=GITHUB_API_TOKEN=${GITHUB_API_TOKEN}
参考 :
1
1
related: