A Flutter project implementing a login flow with GetX for state management and a layered architecture separating UI, business logic, and networking.
- Repository pattern —
LoginRepositorysits between the UI and the network layer, keeping API calls out of the controller - Network layer —
NetworkApiServiceswraps thehttppackage with timeout handling and custom exceptions for connection/timeout errors - GetX state management —
LoginViewControllermanages reactive form state and loading state during the API call - Model layer —
UserModelfor JSON serialization/deserialization
lib/
├── models/ data models (UserModel)
├── data/ network layer, exceptions, response wrappers
├── repository/ mediates between controllers and the network layer
├── viewmodels/ GetX controllers + services
├── view/ UI screens
└── res/ routes, localization, app constants
flutter pub get
flutter runThis was one of my first attempts at MVVM + GetX, built to learn the pattern. Dependency injection isn't fully wired in yet (dependencies are currently instantiated directly rather than via GetX bindings) — a planned next step if I revisit this.