DEV Community

Rody Davis
Rody Davis

Posted on • Originally published at rodydavis.com on

1

Flutter Cheat Sheet — Terminal

Run Flutter web with SKIA

flutter run -d web --release --dart-define=FLUTTER_WEB_USE_SKIA=true
Enter fullscreen mode Exit fullscreen mode
  • Run Flutter web with Canvas Kit
flutter run -d chrome --release --dart-define=FLUTTER_WEB_USE_EXPERIMENTAL_CANVAS_TEXT=true
Enter fullscreen mode Exit fullscreen mode
  • 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/
Enter fullscreen mode Exit fullscreen mode
  • Clean rebuild CocoaPods
cd ios && pod deintegrate && pod cache clean —all && pod install && cd ..
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode
  • Watch Build Files
flutter packages pub run build_runner watch -—delete-conflicting-outputs
Enter fullscreen mode Exit fullscreen mode
  • Generate Build Files
flutter packages pub run build_runner build -—delete-conflicting-outputs
Enter fullscreen mode Exit fullscreen mode
  • Build Bug Report
flutter run —bug-report
Enter fullscreen mode Exit fullscreen mode
  • Flutter generate test coverage
flutter test --coverage && genhtml -o coverage coverage/lcov.info
Enter fullscreen mode Exit fullscreen mode
  • Rebuild Flutter Cache
flutter pub pub cache repair
Enter fullscreen mode Exit fullscreen mode
  • Conditional Export/Import
export 'unsupported.dart'if (dart.library.html) 'web.dart'if (dart.library.io) 'mobile.dart';
Enter fullscreen mode Exit fullscreen mode
  • Kill Dart Running
killall -9 dart
Enter fullscreen mode Exit fullscreen mode

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post