Skip to content

Repository files navigation

GetX MVVM Tutorial

A Flutter project implementing a login flow with GetX for state management and a layered architecture separating UI, business logic, and networking.

What it demonstrates

  • Repository patternLoginRepository sits between the UI and the network layer, keeping API calls out of the controller
  • Network layerNetworkApiServices wraps the http package with timeout handling and custom exceptions for connection/timeout errors
  • GetX state managementLoginViewController manages reactive form state and loading state during the API call
  • Model layerUserModel for JSON serialization/deserialization

Architecture

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

Getting Started

flutter pub get
flutter run

Notes

This 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.

About

A GetX-based Flutter starter demonstrating MVVM architecture — state management, dependency injection, route bindings, and rest-api integration.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages