modugo library

Classes

Event
Singleton class that manages event-based communication using StreamController.
GetIt
Very simple and easy to use service locator You register your object creation factory or an instance of an object with registerFactory, registerSingleton or registerLazySingleton And retrieve the desired object using get or call your locator as function as its a callable class Additionally GetIt offers asynchronous creation functions as well as functions to synchronize the async initialization of multiple Singletons
GoRouterState
The route state during routing.
IGuard
A route guard for access control in Modugo.
IRoute
Marker interface for defining a route structure within the Modugo ecosystem.
Logger
A dependency-free logger for Modugo.
Modugo
The central configuration class for the Modugo routing and dependency system.
Module
Abstract base class for a "module" (feature) within the application.
RouteChangedEventModel
Event fired whenever the application's current route changes.
StatefulNavigationShell
Widget for managing the state of a StatefulShellRoute.
StatefulNavigationShellState
State for StatefulNavigationShell.
Transition
Utility class that provides animated transition builders for Modugo routes.

Enums

TypeTransition
Defines the supported types of transition animations for page navigation.

Mixins

AfterLayoutMixin<T extends StatefulWidget>
A mixin that executes a callback after the first frame has been rendered.
IBinder
Mixin for declaring dependency injection bindings of a module.
IDsl
Provides a declarative, fluent, and strongly-typed API for building route structures inside a Module.
IEvent
Mixin that provides automatic event listening for Modules.
IRouter
Mixin for declaring navigation routes exposed by a module.

Extensions

ContextInjectionExtension on BuildContext
Extension on BuildContext that provides a shorthand for retrieving dependencies registered in the global GetIt service locator.
ContextMatchExtension on BuildContext
Extension on BuildContext that provides advanced route matching utilities.
ContextNavigationExtension on BuildContext
Extension on BuildContext that provides convenient navigation helpers using GoRouter.
GoRouterStateExtension on GoRouterState
Extension on GoRouterState.
UriPathWithExtras on Uri

Properties

events Event
Global default event channel instance.
final
modugoNavigatorKey GlobalKey<NavigatorState>
Global key for the main Navigator used by Modugo. This key is used to access the navigator state globally, allowing for imperative navigation and other operations without needing to pass the context
getter/setter pair
modugoRouter → GoRouter
A convenient global accessor for the configured GoRouter instance.
no setter

Functions

propagateGuards({required List<IGuard> guards, required List<IRoute> routes}) List<IRoute>
Injects a list of guards into each route module in the given list.