Flutter project structure

Flutter project structure

Explorer

  • .dart_tool…, not committed
  • .idea…, not committed
  • .vscodenew
  • launch.jsonnew
  • settings.jsonnew
  • extensions.jsonnew
  • android
  • gradle…
  • .gitignore
  • build.gradle.kts
  • gradle.properties
  • settings.gradle.kts
  • local.properties, not committed
  • assetsnew
  • imagesnew
  • iconsnew
  • fontsnew
  • build…, not committed
  • confignew
  • dev.jsonnew
  • staging.jsonnew
  • coverage…new, not committed
  • ios
  • Flutter…
  • Runner.xcodeproj…
  • Runner.xcworkspace…
  • RunnerTests…
  • Pods…new, not committed
  • .gitignore
  • lib
  • app.dartnew
  • main.dart
  • test
  • widget_test.dart
  • toolnew
  • web
  • icons…
  • favicon.png
  • index.html
  • manifest.json
  • .fvmrcnew
  • .gitignore
  • .metadata
  • AGENTS.mdnew
  • CLAUDE.mdnew
  • Makefilenew
  • README.md
  • analysis_options.yaml
  • build.yamlnew
  • devtools_options.yamlnew
  • flutter_launcher_icons.yamlnew
  • l10n.yamlnew
  • lefthook.ymlnew
  • my_app.iml, not committed
  • pubspec.yaml
  • pubspec.lock
  1. # Check your setup (Android SDK, Xcode on a Mac, a device or emulator)

    flutter doctor
  2. # Create the app for the platforms you ship, with your reverse domain as the bundle id

    flutter create --org com.example --platforms=android,ios,web my_app
  3. # Add routing, state, networking and storage

    cd my_app && flutter pub add go_router flutter_riverpod dio flutter_secure_storage shared_preferences freezed_annotation json_annotation
  4. # Add code generation and test tools

    flutter pub add dev:build_runner dev:freezed dev:json_serializable dev:mocktail && flutter pub add dev:integration_test --sdk=flutter
  5. # Add translations

    flutter pub add flutter_localizations --sdk=flutter && flutter pub add intl:any
  6. # Run it with a flavor and config file

    flutter run --flavor staging --dart-define-from-file=config/staging.json