Skip to main content

Flutter Cheatsheet

Cheatsheet for Flutter and Dart.

  • Each dart file is a library ref.

Every Dart file (plus its parts) is a library, even if it doesn't use a library directive

Create new project

# Create new app with all platforms
flutter create <project_name>
# Only enable some platforms
flutter create <project_name> --platforms=ios,web

Unable to boot the simulator

Base on https://stackoverflow.com/questions/72229589/flutter-xcode-error-unable-to-boot-the-simulator

  • In settings, search for Storage
  • Click the i icon next to `Developer
  • Delete Xcode cache
  • In terminal run open -a Simulator to open the simulator
  • Right-click on the simulator icon and use the menu to select os and device, e.g. Device -> iOS 17.2 -> iPhone 15