mcpField
F
flutter-terminal-cheat-sheet

flutter-terminal-cheat-sheet

github.com/rodydavisDevelopment6062 installsUpdated 2w ago
Repository

About flutter-terminal-cheat-sheet

Flutter Terminal Cheat Sheet is a skill that collects Flutter and Dart terminal commands for common development tasks. It is intended for developers who want quick references for builds, cleanup, code generation, and test coverage.

Key features

  1. 01Flutter web run commands
  2. 02GitHub Pages web build steps
  3. 03CocoaPods cleanup commands
  4. 04Dart package creation command
  5. 05Build file generation and watch
  6. 06Test coverage generation

Use cases

  1. 01Run Flutter web with SKIA or Canvas Kit
  2. 02Build a web app into the docs folder
  3. 03Regenerate build files or Flutter cache
  4. 04Create a Dart plugin with an example

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/rodydavis/skills --skill flutter-terminal-cheat-sheet

After installing, type/flutter-terminal-cheat-sheetin Claude Code to confirm it loaded.

Details

From the project README

Flutter Terminal Cheat Sheet

Run Flutter web with SKIA

flutter run -d web --release --dart-define=FLUTTER_WEB_USE_SKIA=true

Run Flutter web with Canvas Kit

flutter run -d chrome --release --dart-define=FLUTTER_WEB_USE_EXPERIMENTAL_CANVAS_TEXT=true

Build your Flutter web app to Github Pages to the docs folder

flutter build web && rm -rf ./docs && mkdir ./docs && cp -a ./build/web/. ./docs/

Clean rebuild CocoaPods

cd ios && pod deintegrate && pod cache clean —all && pod install && cd ..

Sometimes with firebase you need to run: pod update Firebase

Create Dart package with Example

flutter create -t plugin . && flutter create -i swift -a kotlin --androidx example

Watch Build Files

flutter packages pub run build_runner watch  -—delete-conflicting-outputs

Generate Build Files

flutter packages pub run build_runner build  -—delete-conflicting-outputs

Build Bug Report

flutter run —bug-report

Flutter generate test coverage

flutter test --coverage && genhtml -o coverage coverage/lcov.info

Rebuild Flutter Cache

flutter pub pub cache repair

Clean every flutter project

find . -name "pubspec.yaml" -exec $SHELL -c '
    echo "Done. Cleaning all projects."
    for i in "$@" ; do
        DIR=$(dirname "${i}")
        echo "Cleaning ${DIR}..."
        (cd "$DIR" && flutter clean >/dev/null 2>&1)
    done
    echo "DONE!"
' {} +

Conditional Export/Import

export 'unsupported.dart'
    if (dart.library.html) 'web.dart'
    if (dart.library.io) 'mobile.dart';

Kill Dart Running

killall -9 dart

Flutter scripts 

Add all the scripts to your pubspec.yaml with flutter_scripts.

Comments

Markdown supported