A sample flutter app that has multiple features.
Inspired by Clean Architecture from Uncle Bob
App has multiple features - posts, weather. Each feature split in to 3 layers
- 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.
[✓] 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)
- install flutter
dart pub global activate melos
dart run melos bootstrap
cd apps/app_main
flutter run
- https://pub.dev/packages/melos
- lib versions
- add Oauth2
- cfug/dio#1653
- https://pub.dev/packages/auto_route
- https://pub.dev/packages/app_links
- https://pub.dev/packages/mapify_generator
- add loading indicators using Lottie