get_it_modular_with_auto_route 2.0.0
get_it_modular_with_auto_route: ^2.0.0 copied to clipboard
An integration for get_it_modular that simplifies modular routing by providing convenient wrappers and helpers for the auto_route package.
GetIt Modular with AutoRoute 🧩+🚗 #
An opinionated, contract-based framework for building scalable, modular Flutter applications. This package provides a complete architectural scaffolding using get_it for dependency injection and auto_route for navigation.
Philosophy #
This package provides an "architecture-in-a-box." It's designed for teams and projects that want a clear, consistent, and scalable structure from day one. By providing a set of abstract contracts, it ensures that your application's core components—dependency injection, routing, and initialization—are cleanly separated and managed.
The Core Contracts #
This framework is built upon a set of abstract classes you will implement:
ModuleContract: The blueprint for a self-contained feature. Each module defines its own dependencies and routes.ModuleSettingsContract: The central orchestrator. This is where you register all your app's feature modules.AppRouterContract: Your application's router. It automatically collects and builds the route map from all registered modules.ModularAppContract: The root of your application widget. It ties all the other contracts together and manages the app's initialization sequence.ModuleScope: AStatefulWidgetthat automatically manages the lifecycle of a module's dependencies, loading them only when a module's routes are active.