A production-ready Flutter Starter Template meticulously structured using Clean Architecture patterns securely powered natively by GetX. This fully modular toolkit scales seamlessly, enabling lightning-fast UI rendering alongside highly optimized robust data workflows!
This project completely isolates responsibilities natively across dedicated modules:
lib/
├── app.dart # Core MaterialApp Initialization
├── main.dart # App entry point natively bound to initialization
├── bindings/
│ └── app_binding.dart # Centralized GetX Dependency Injection
├── core/ # Foundation Utilities shared globally
│ ├── network/ # API Endpoints and Custom NetworkCaller Engine
│ ├── storage/ # GetStorage persistence interface
│ ├── theme/ # Separated Dark/Light mode color schemes
│ ├── localization/ # Externalized EN, AR, BN mapped translation dictionaries
│ ├── utils/ # Settings global utils, Assets structural mapper
│ └── widgets/ # Core generic UI components (Buttons, Skeleton items, Svgs)
├── features/ # Segmented modular apps exactly implementing clean workflows
│ └── home/
│ ├── view/ # UI Display using purely StatelessWidget
│ ├── controller/ # Business Logic & Rx States (GetX)
│ ├── service/ # Direct Data Layer APIs cleanly communicating outwards
│ └── model/ # Domain Data schemas
└── routes/
├── app_pages.dart # Global Navigation mappings statically
└── app_routes.dart # Distinct string-based Route mapping URLs
To initialize this cleanly built template precisely from scratch anywhere:
-
Clone & Enter the Repository
git clone https://github.com/firad-bdevs/starter-template.git cd starter-template -
Fetch Dependencies Run the following to completely pull down all explicitly bounded GetX, Networking, and Assets packages natively:
flutter pub get
-
Launch the App
flutter run
Includes an advanced, globally injected NetworkCaller.
- Automatically parses success and error JSON gracefully without UI crashing.
- Includes JWT Auto-Refreshing Token mechanisms built inside
_getHeaders()and_sendRequest(). - Supports transparent background fetches. Easily disables UI-blocking
EasyLoadingoverlays by settingshowLoading: falseinside requests!
No messy StatefulWidget sprawl or un-traceable components:
- Centralized
AppBindingnatively handles injecting global Singletons (StorageService,NetworkCaller, etc.) the exact moment the app mounts. - Controllers bind to data gracefully allowing strictly optimal single-page modular logic! All Views are strictly
StatelessWidget. - Dependency Retrieval relies solely on
Get.find<Controller>()maximizing tree efficiency.
Instantly globalize natively!
- Supports English, Arabic (Right-to-Left Layout perfectly supported), and Bengali.
- Translations mapped to individually externalized files cleanly residing inside
lib/core/localization/langs/. - Changing the language (
SettingsUtil.changeLanguage(lang)) natively re-evaluates the active Layout Direction.
A dedicated structural SettingsUtil powers universal theming optimally!
- Changes between
Light,Dark, andSystemseamlessly withSettingsUtil.changeTheme(theme). - Dedicated primitives locally stored internally inside
light_colors.dartanddark_colors.dartmakes designing new components extremely foolproof. - Instantly retains choices natively inside persistent storage dynamically, reloading perfectly on app-boot instantly without weird flashing layouts!
Cleanly structured UI integrations explicitly separated inside core/utils:
IconPathsecurely natively boundsassets/icons/.ImagePathstructurally managesassets/images/.- Ready-to-use globally generic
CustomSvgIconwidget seamlessly renders vectors without needing native context lookups.
Tired of generic App Loading Spinners?
- Skeleton List placeholders optimally deployed precisely behind clean interfaces safely mimicking your Layout shapes directly while API loads data softly into grids.
Whenever extending a new module securely (like Profile or Settings):
- Model: Set up your JSON
Modelinsidefeatures/[name]/model/ - Service: Hook up endpoints to
NetworkCallersequentially insidefeatures/[name]/service/. - Controller: Fetch that explicit data securely loading values natively across
RxListitems insidefeatures/[name]/controller/. - View: Present your interface purely relying on
Get.find<MyController>()explicitly insidefeatures/[name]/view/. - Route: Setup your strings natively into
AppRoutesand integrate intoAppPagesmapping precisely.
To deeply structure entirely new elements inside your apps globally, simply append generic styling blocks natively over inside:
lib/core/theme/dark_theme.dart AND lib/core/theme/light_theme.dart pulling specifically exclusively from the strictly defined generic DarkColors and LightColors.
Adding languages flawlessly works entirely through three explicit additions:
- Create your definitions uniquely inside
lib/core/localization/langs/my_lang.dart. - Map it seamlessly into
AppTranslationsindex file mappings natively. - Call
SettingsUtil.changeLanguage('xx')freely from any button on any screen!
Authored optimally for rapid scalability and extreme code readability. Never struggle to find where API calls or UI states originate again!