A sample flutter app that has multiple features.
Inspired by Clean Architecture from Uncle Bob
[✓] Flutter (Channel stable, 3.24.5, on macOS 15.1 24B83 darwin-arm64, locale en-KG)
• Flutter version 3.24.5 on channel stable at /Users/user/fvm/versions/3.24.5
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (6 days ago), 2024-11-13 11:13:06 -0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/user/Library/Android/sdk
• Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
• Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16B40
• CocoaPods version 1.15.2
[✓] Android Studio (version 2024.2)
App has multiple features - posts, weather. Each feature split in to 3 modules
- Presentation - contains Presentation Layer (widgets and cubits)
- Domain - contains Domain layer with business logic (interactors and interfaces)
- Data - contains Data layer with REST API requests
- UI sends signals to Cubit
- Cubit executes Use cases from Interactor.
- Use case obtains data from Repository
- Repository returns data from a Api.
- Information flows back to the UI to be displayed.
Presentation and Data depends on Domain, but Domain know nothing about them.
.run scripts
- build_runner - run
dart run build_runner build --delete-conflicting-outputs
in all modules with build_runner enabled - clean_all - run
flutter clean
in all modules - pub_get_all - run
flutter pub get
in all modules - generate_translate_file - run
flutter gen-l10n
in all modules with l10n.yaml file - main.dart - run app