fp_core library

Classes

ActiveGuardObserver
Observers the current guards processing navigation event
AdaptiveRoute<R>
Builds an AutoRoute instance with RouteType.adaptive type
AdaptiveRouteType
Generates a route transitions based on platform
AdminBreadcrumbItem
Breadcrumb trail step item for page-level navigation.
AdminNavItem
Enterprise navigation item schema supporting deep nesting, badges, and RBAC.
AdminPanelScaffold
Enterprise-grade, adaptive layout shell featuring collapsible sidebar rails, persistent top-bar action menus, role-based visibility, and mobile drawer/navigation bar.
AdminTheme
InheritedWidget providing AdminThemeConfig down the widget subtree.
AdminThemeConfig
Configuration object defining styling, dimensional constraints, and animation physics for the enterprise Admin Dashboard suite.
AppColors
Enterprise Design System Tokens & Theme Builder for Flutter Prakash applications. Design System Color Palette.
AppElevation
Design System Elevation Constants.
AppEvent<T>
Base contract for all global cross-module application events. T is the strongly-typed payload carried by the event.
AppEventCubit
An enterprise global event bus Cubit to dispatch cross-module signals without tight coupling between distinct feature BLoCs.
AppEventListener
A high-performance, zero-boilerplate listener that binds AppEvents to a single BlocListener stream subscription.
AppEventState
State wrapper emitted by AppEventCubit whenever an AppEvent is fired.
AppMultiEventListener
Semantic alias for AppEventListener accepting multiple OnEvent handlers.
AppRadii
Design System Border Radii Constants.
AppRestartWrapper
Generic application restart wrapper widget that enables hot app resetting/rebuilding.
AppSpacing
Design System Spacing Constants.
AppThemeBuilder
Enterprise Material 3 Theme Builder.
AppUpdateInfoResult
App update info summary for immediate handling by host apps.
AuthFailure
Represents an authentication or session-related failure.
AuthStateChangedEvent
User authentication state change signal (e.g. login, logout).
AutoLeadingButton
An AutoRoute replacement of appBar aut-leading-button
AutoPageView
Most of the code here is taking from flutter's TabView
AutoPageViewState
State implementation of AutoPageView
AutoRoute
A route entry configuration used in RouteMatcher to create RouteMatch's from paths and PageRouteInfo's
AutoRouteAware
An interface used to mark classes as AutoRouteAware entities usually implemented by widget States
AutoRouteGuard
A middleware for stacked routes where clients can either resume or abort the navigation event
AutoRouteGuardCallback
A simple implementation of AutoRouteGuard that calls the provided OnNavigation function
AutoRouteInformation
An extended type of RouteInformation that holds an extra property replace which forces the current route to be replaced
AutoRouteInformationProvider
The route information provider that propagates the platform route information changes.
AutoRouteNavigator
An AutoRoute Wrapper for Navigator it handles empty stacks and declarative routes
AutoRouteNavigatorState
State of AutoRouteNavigator
AutoRouteObserver
A Navigator observer that notifies AutoRouteAwares of changes to the state of their Route.
AutoRoutePage<T>
Creates a RoutePage based on routeData.type, The decision happens inside of onCreateRoute
AutoRouter
A Wrapper for Navigator that handles stack-routing
AutoRouterConfig
Classes annotated with AutoRouteConfig will generate an abstract class that extends RootStackRouter that can be extended by the annotated class to be used as the RootRouter of the App
AutoRouterDelegate
An auto_route implementation for RouterDelegate
AutoRouterObserver
An extended version of NavigatorObserver to support Tab-int and tab-change events observation
AutoRouterState
State implementation of AutoRouter
AutoRouteWrapper
clients will implement this class to provide a wrapped route.
AutoTabsRouter
An implementation of a router widget that handles parallel routeing
AutoTabsRouterState<T extends AutoTabsRouter>
The state implementation of AutoTabsRouter
AutoTabsScaffold
A scaffold wrapper widget that makes creating an AutoTabsRouter much easier and cleaner
BaseBloc<E, S>
Enterprise base Bloc with lifecycle-safe emit, side-effect stream, and Result-to-UiState conversion helpers.
BaseCubit<S>
Enterprise base Cubit with lifecycle-safe emit and one-shot side-effect stream.
BaseDataSource
Abstract Base Data Source interface contract for Remote and Local Data Sources.
BaseEvent
Abstract base event for all BLoC events in clean architecture.
BaseFormCubit<S extends FormCubitState<R>, R>
Enterprise base form cubit that eliminates the validate → loading → API → result boilerplate.
BaseLocalDataSource
Abstract contract for Local Data Sources.
BaseModel
Base model abstraction ensuring all domain models enforce equality comparison.
BasePagingCubit<T>
Lightweight base paging cubit for simple pagination use cases.
BasePagingState<T>
State for BasePagingCubit.
BasePrefs
BaseRemoteDataSource
Abstract contract for Remote Data Sources.
BaseRepository
Abstract Base Repository interface contract for Clean Architecture.
BaseUiCubit<T>
Enterprise base UI cubit for data-fetching operations.
Bloc<Event, State>
Takes a Stream of Events as input and transforms them into a Stream of States as output.
BlocBase<State>
An interface for the core functionality implemented by both Bloc and Cubit.
BlocBuilder<B extends StateStreamable<S>, S>
BlocBuilder handles building a widget in response to new states. BlocBuilder is analogous to StreamBuilder but has simplified API to reduce the amount of boilerplate code needed as well as bloc-specific performance improvements. Please refer to BlocListener if you want to "do" anything in response to state changes such as navigation, showing a dialog, etc...
BlocBuilderBase<B extends StateStreamable<S>, S>
Base class for widgets that build themselves based on interaction with a specified bloc.
BlocConsumer<B extends StateStreamable<S>, S>
BlocConsumer exposes a builder and listener in order react to new states. BlocConsumer is analogous to a nested BlocListener and BlocBuilder but reduces the amount of boilerplate needed. BlocConsumer should only be used when it is necessary to both rebuild UI and execute other reactions to state changes in the bloc.
BlocEventSink<Event extends Object?>
An ErrorSink that supports adding events.
BlocFailure
BlocInitial
BlocListener<B extends StateStreamable<S>, S>
Takes a BlocWidgetListener and an optional bloc and invokes the listener in response to state changes in the bloc. It should be used for functionality that needs to occur only in response to a state change such as navigation, showing a SnackBar, showing a Dialog, etc... The listener is guaranteed to only be called once for each state change unlike the builder in BlocBuilder.
BlocListenerBase<B extends StateStreamable<S>, S>
Base class for widgets that listen to state changes in a specified bloc.
BlocLoading
BlocObserver
An interface for observing the behavior of Bloc instances.
BlocProvider<T extends StateStreamableSource<Object?>>
Takes a create function that is responsible for creating the Bloc or Cubit and a child which will have access to the instance via BlocProvider.of(context). It is used as a dependency injection (DI) widget so that a single instance of a Bloc or Cubit can be provided to multiple widgets within a subtree.
BlocSelector<B extends StateStreamable<S>, S, T>
BlocSelector is analogous to BlocBuilder but allows developers to filter updates by selecting a new value based on the bloc state. Unnecessary builds are prevented if the selected value does not change.
BlocStatus
Sealed status for form cubits — no codegen required.
BlocSuccess
CacheFailure
Represents a failure originating from local caching or storage.
CancelledFailure
Represents a failure when an operation is cancelled by the user.
CartUpdatedEvent
Shopping cart updated signal. Payload: List of items or IDs.
Change<State>
A Change represents the change from one State to another. A Change consists of the currentState and nextState.
Closable
An object that must be closed when no longer in use.
Cubit<State>
A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states.
CupertinoFullscreenDialogTransition
An iOS-style transition used for summoning fullscreen dialogs.
CupertinoPageTransition
Provides an iOS-style page transition animation.
CupertinoRoute<R>
Builds an AutoRoute instance with RouteType.cupertino type
CupertinoRouteType
Generates a route that uses CupertinoRouteTransitionMixin
CustomRoute<R>
Builds an AutoRoute instance with RouteType.custom type
CustomRouteType
Generates a route with user-defined transitions
DataTableCard
Enterprise-grade card wrapper for tabular data displays. Includes built-in live search bar, filter action slots, refresh callback, export actions, loading overlay, empty state, and error handling.
Debouncer<T>
Debounces rapid successive invocations, deferring action until duration has passed without a new call. Ideal for search-as-you-type.
DebugBanner
A customizable, flavor-aware Debug Banner widget that displays build mode (D for Debug, R for Release, P for Profile) alongside the specified environment flavor (e.g. DEV (D), DEV (R), PROD (D)).
Holds deep-link information
DefaultRouteParser
AutoRoute extension of RouteInformationParser
DeferredLoadingPlaceholder
Displays a progress indicator when the widget is a deferred component and is currently being installed.
DeferredWidget
Wraps the child inside a deferred module loader.
DevtoolsAppDataStorageTabView
DevtoolsCustomOption
A single configurable custom option (feature flag or toggle).
DevtoolsCustomOptions
Convenience helper to read a custom option value anywhere in the app.
DevtoolsCustomOptionsStore
Simple in-memory registry of custom options registered by the app.
DevtoolsCustomOptionsTabView
Custom Options tab view — feature flags and environment toggles.
DevToolsDialog
Production-ready DevTools Dialog for inspecting REST APIs, GraphQL, Loggers, SharedPreferences/SecureStorage, and AppData files.
DevtoolsFloatingDock
Floating DevTools dock overlay widget. Wrap your app child inside this widget or put in MaterialApp(builder: ...) to access DevTools from anywhere.
DevtoolsGraphqlController
Global controller holding captured GraphQL operations.
DevtoolsGraphqlEntry
A single captured GraphQL operation entry.
DevtoolsGraphqlInspectorTabView
GraphQL Inspector tab view.
A Link wrapper that captures GraphQL operations for the inspector.
DevtoolsLogEntry
DevtoolsLogger
Simple in-memory devtools logger. Use anywhere in app: DevtoolsLogger.instance.i('Hello'); DevtoolsLogger.instance.e('Oops', error: err, stackTrace: st);
DevtoolsLoggerTabView
DevtoolsNetEntry
DevtoolsNetworkInspectorController
DevtoolsNetworkInspectorInterceptor
DevtoolsPreferencesTabView
DevtoolsRetrofitNetworkingInspectorTabView
Disposable
If objects that are registered inside GetIt implements Disposable the onDispose method will be called whenever that Object is unregistered, reset or its enclosing Scope is popped
DisposeMethod
marks an instance method as a dispose call back to be passed to GetIt
Emittable<State extends Object?>
An object that can emit new states.
EmittableStateStreamableSource<State>
A StateStreamableSource that can emit new states.
Emitter<State>
An Emitter is a class which is capable of emitting new states.
EmptyShellRoute
A proxy Route page that provides a way to create a PageRouteInfo without the need for creating a new Page Widget
EnterpriseBlocObserver
Enterprise BLoC observer with configurable structured logging.
Environment
Used to annotate dependencies which are registered under certain environments
EnvironmentFilter
a simple filter function to be used inside SimpleEnvironmentFilter filter for whether to register for the given set of environments clients can extend this class to maker their own environmentFilters
Equatable
A base class to facilitate operator == and hashCode overrides.
EquatableConfig
The default configuration for all Equatable instances.
Error<T>
Represents a failed Result state containing a domain Failure.
ErrorSink
A generic destination for errors.
ExternalModule
FactoryMethod
Marks a factory, a named constructor or a static create function as an injectable constructor if not added the default constructor will be used
FactoryParam
Marks a constructor param as factoryParam so it can be passed to the resolver function
Failure
Base class for all domain-layer failures.
Fake
A comprehensive, full-featured fake data generator utility (Fake) designed for unit testing, widget testing, mock models, UI placeholders, network simulation, and in-memory/disk temporary image and file creation.
Field<T>
An immutable, reactive form field with built-in validation, dynamic label and hint inference, callable shorthand mutator, backend error support, and value-equality via Equatable.
Fields
Pre-configured, enterprise-grade form fields with battle-tested validation rules, dynamic labels, and customizable placeholders.
FilePickerFailure
Represents a failure during file selection or file system access.
FilePreviewContainer
A highly reusable, enterprise-grade File Preview container and screen.
FilterArgs
Filter arguments
FirebaseAnalyticsManager
Firebase Analytics Manager supporting custom events, screen tracking, user ID and properties.
FirebaseCloudMessagingManager
Firebase Cloud Messaging (FCM) Manager for handling permissions, FCM tokens, topics, and foreground / background message streams.
FirebaseCrashlyticsManager
Firebase Crashlytics manager for automated Flutter exception capturing, custom key-value logging, non-fatal errors, and crash collection controls.
FirebaseEngine
Master Firebase Suite Engine for Flutter Prakash applications.
FirebaseEngineConfig
Configurable feature toggles for FirebaseEngine.
FirebaseServiceInitResult
Result of individual Firebase service initialization.
FlutterLogger
A comprehensive logger for Flutter applications with ANSI color highlights, JSON/object pretty-printing, configurable tags, error handling, and stack traces.
FormCubit<S extends FormState>
A generic form cubit that eliminates the validate→loading→result boilerplate.
FormCubitState<R>
Base state class for form cubits with status tracking, validation, and optional result payload.
FormState
A base state interface that all form states must satisfy.
FpColorUtils
Utility class for generating deterministic, harmonious colors and shade variants from text input.
FpCorePlatform
The interface that platform-specific implementations of flutter_prakash_core must extend.
FpCorePlugin
Top-level interface for native plugin operations in Flutter Prakash Core (FP).
FpDI
Unified Dependency Injection Manager for Flutter Prakash (FP).
FpEffect
Base class for all side-effects emitted by BaseCubit.
FpEffectEmitter
Interface for components (such as BaseCubit and BaseBloc) that emit one-shot FpEffect instances.
FpEffectListener
A widget that listens to the effectStream of a BaseCubit or BaseBloc and fires one-shot side-effects (toasts, navigation, dialogs) without polluting BLoC state.
FpEventTransformers
Enterprise event transformers using RxDart for BLoC event streams.
FpRouteGuard
Base abstract route guard for AutoRoute.
FpRouteObserver
Global route navigation observer for tracking active screens and logging navigation events.
GenericAppEvent
Generic untyped event for lightweight signals.
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
GetItHelper
a helper class to handle conditional registering
GuardEntry
A class that holds a guard and it's corresponding resolver
HierarchySegment
An abstract representation of a RouteMatch
HomeDataUpdatedEvent
Home feed data update signal. Payload: None.
IgnoreParam
Constructor params annotated with IgnoreParam will be ignored by when generating the resolver function
InAppReviewManager
Manager for handling native In-App Reviews and Store Listings.
InAppUpdateManager
In-App Update Manager for handling Play Store updates (Flexible & Immediate).
InAppWebViewContainer
Reusable full-featured InAppWebView Container and Page component for enterprise apps.
InitDependency
Data structure used to identify a dependency by type and instanceName
Injectable
Marks a class as an injectable dependency and generates
InjectableInit
// Marks a top-level function as an initializer function for configuring Get_it
KeepAliveTab
A Wrapper widget to utilize AutomaticKeepAliveClientMixin
KeepAliveTabState
The state of KeepAliveTab
LazySingleton
Classes annotated with @LazySingleton will generate registerLazySingleton func
LiveData<T>
Using: LiveData<T> instead of setState({}); for better performance in StatefulWidget.
LoadingOverlay
A customizable, static, full-screen loading overlay.
LocaleCubit
An enterprise persistent LocaleCubit backed directly by SharedPreferences.
MaterialRoute
Builds an AutoRoute instance with RouteType.material type
MaterialRouteType
Generates a route that uses MaterialRouteTransitionMixin
MethodChannelFpCore
An implementation of FpCorePlatform that uses method channels.
MetricCard
Enterprise KPI and status metric card with trend indicators, status badges, custom icons, and skeleton loading support.
MicroPackageModule
Module
marks a class as a register module where all property accessors rerun types are considered factories unless annotated with @singleton/lazySingleton.
MultiBlocListener
Merges multiple BlocListener widgets into one widget tree.
MultiBlocObserver
A BlocObserver which supports registering multiple BlocObserver instances. This is useful when maintaining multiple BlocObserver instances for different functions e.g. LoggingBlocObserver, ErrorReportingBlocObserver.
MultiBlocProvider
Merges multiple BlocProvider widgets into one widget tree.
MultiRepositoryProvider
Merges multiple RepositoryProvider widgets into one widget tree.
MultiSelectOption<T>
An option item for ReactiveMultiSelect.
Named
Used to register a dependency under a name instead of type also used to annotated named injected dependencies in constructors
NamedRoute<A extends Object?>
A named route that can be used to navigate to a named destination typically built with NamedRouteDef
NamedRouteDef
Builds an AutoRoute instance with a direct page builder
Emits a navigation signal to the UI layer.
An abstract parent type for all navigation failures
Represents a guarded navigation event which can be either continued or aborted used in AutoRouteGuard.onNavigation
NestedStackRouter
An Implementation of StackRouter used by nested AutoRouter widgets
NetworkFailure
Represents a failure due to lack of network connectivity.
NoEnvOrContains
This filter validates dependencies with no environment keys or contain the provided environment
NoEnvOrContainsAll
This filter validates dependencies with no environment keys, or the ones containing all the provided environments
NoEnvOrContainsAny
This filter validates dependencies with no environment keys, or the ones containing one of the provided environments
NoParams
Represents an empty parameters object for UseCases requiring no input arguments.
ObjectRegistration<T extends Object>
OnEvent<E extends AppEvent>
A strongly-typed event handler registration for AppEventListener.
Order
Classes annotated with @Order will overwrite the automatically generated position of the
Standardized enterprise page-level header containing dynamic breadcrumbs, title, subtitle, and responsive action controls.
PageInfo
Holds information of the generated RoutePage page
PagelessRoutesObserver
This ChangeNotifier observes the top-most entry in Navigator and reports whether it's a pageless route
PageRouteInfo<T extends Object?>
Holds information of a named destination
PaginatedCubit<T, F>
Base enterprise Paginated Cubit that integrates PagingController with BLoC state, automated debounce search, dynamic filtering, pull-to-refresh, optimistic item mutations, out-of-order race condition guards, Dio CancelToken aborts, and error retries.
PaginatedGridView<T, C extends PaginatedCubit<T, F>, F>
A reactive, zero-boilerplate paginated grid widget that binds directly to a PaginatedCubit.
PaginatedListView<T, C extends PaginatedCubit<T, F>, F>
A reactive, zero-boilerplate paginated list widget that binds directly to a PaginatedCubit.
PaginatedSliverList<T, C extends PaginatedCubit<T, F>, F>
A reactive paginated sliver list widget for use inside CustomScrollView.
PaginatedState<T, F>
An immutable state model for paginated lists with search and filtering.
PagingListView<C extends BasePagingCubit<T>, T>
A reactive list view widget for BasePagingCubit.
Parameters
This class helps read typed data from raw maps, it's used for both path-parameters and query-parameters
ParsingFailure
Represents a failure when data parsing/mapping fails.
Internal passthrough used when no forward link is supplied.
PathParam
this annotation is used to make parameters that's supposed to take their values from the dynamic segments of a path
PendingRoutesHandler
Holds a one-time read initial routes value used by declarative routing widgets
PermissionFailure
Represents a failure due to missing or denied system permissions.
Holds information of the deep-link coming from the platform window
PostConstruct
methods annotated with postConstruct will be called in a cascade manner after being constructed
PreResolve
Futures annotated with preResolve will be pre-awaited before they're registered inside of GetIt
PrettyDioLogger
A pretty logger for Dio it will print request/response info with a pretty format and also can filter the request/response by RequestOptions
ProductLikeEvent
Product favorite / like signal. Payload: Product ID (int).
ProfileChangedEvent
Profile update signal. Payload: None.
QueryParam
this annotation is used to make parameters that's supposed to take their values from query params of the url
RadioOption<T>
An option item for ReactiveRadioGroup.
ReactiveCheckbox
A reactive checkbox that binds to a Field<bool>.
ReactiveDatePicker
A reactive date picker that binds to a Field<DateTime?>.
ReactiveDropdown<T>
A reactive dropdown that binds to a Field<T?>.
ReactiveFormButton<C extends FormCubit<S>, S extends FormState>
A reactive submission button that automatically binds to a FormCubit, showing a progress indicator during BlocStatus.loading and triggering form submission on tap.
ReactiveFormListener<C extends FormCubit<S>, S extends FormState>
A reactive form listener widget that automatically handles success/failure snackbars and callbacks without repetitive BlocListener boilerplate.
ReactiveMultiSelect<T>
A reactive multi-select chip group that binds to a Field<List<T>>.
ReactivePinCodeField
A reactive PIN/OTP verification code field that binds to a Field<String>.
ReactiveRadioGroup<T>
A reactive radio group that binds to a Field<T?> or Field<T>.
ReactiveSegmentedButton<T>
A reactive segmented button that binds to a Field<T>.
ReactiveSlider
A reactive slider that binds to a Field<double>.
ReactiveSwitch
A reactive switch that binds to a Field<bool>.
ReactiveTextField
A reactive text field that binds to a Field<String>.
ReactiveTimePicker
A reactive time picker that binds to a Field<TimeOfDay?>.
RedirectRoute
Builds a Redirect AutoRoute instance with no type
ReevaluatableRouteMatch<T, R>
When a route is re-evaluated this class is used to hold currentPage instance which will be used in-case there's no need to create a new one
ReevaluateListenable
Abstraction for an Adapter that converts different listenable types e.g (streams) to a ChangeNotifier
RejectedByGuardFailure
A failure indicates that the one of the guards has aborted the navigation on this route by calling NavigationResolver.next with false value
RepositoryProvider<T>
Takes a create function that is responsible for creating the repository and a child which will have access to the repository via RepositoryProvider.of(context). It is used as a dependency injection (DI) widget so that a single instance of a repository can be provided to multiple widgets within a subtree.
ResolverResult
Holds NavigationResolver.resolveNext values
Responsive
Responsive utility class containing context-agnostic checks & breakpoints
ResponsiveBreakpoints
Screen Size Breakpoints for Enterprise Applications
ResponsiveBuilder
Conditional Widget Builder for custom layouts across breakpoints
ResponsiveGrid
An auto-adapting grid wrapper that automatically calculates column counts based on screen width breakpoints or explicit column overrides.
ResponsiveGridCol
12-column responsive layout column definition.
ResponsiveGridRow
A 12-column fluid responsive row container that automatically lays out ResponsiveGridCol children wrapping across lines.
Result<T>
A sealed class representing either a successful outcome with data T or a failed outcome with a domain Failure.
RootStackRouter
An Implementation of StackRouter used by AutoRouterDelegate
RouteCollection
Holds a single set of config-entries
RouteData<R>
Holds final information of presented routes That's consumed by AutoRoutePage
RouteDataScope
Injects the given routeData to context so it can be looked up by any child widget
RouteMatch<T>
This is the result returned by RouteMatcher when a match is found
RouteNotFoundFailure
A failure indicates that the request route or path has not been found by the RouteMatcher
RouteOverrides
Holds overridable route values
RoutePage
This annotation is used to mark flutter widgets as routable pages by enabling the router to construct them.
RouterScope
Injects the given RoutingController to context so it can be looked up by any child widget
RouteType
An abstraction of route types used by AutoRoutePage.onCreateRoute to decide transition animations
RoutingController
An Abstraction for an object that manages page navigation
Scope
Used to annotate dependencies which are registered under a different scope than main-scope
ServerFailure
Represents a failure originating from server interactions.
ShadowChangeHandlers
If an object implements the ShadowChangeHandler if will get notified if an Object with the same registration type and name is registered on a higher scope which will shadow it. It also will get notified if the shadowing object is removed from GetIt
Shimmer
ShimmerLoading
ShimmerState
ShowDialogEffect
Emits a dialog show signal to the UI layer.
ShowToastEffect
Emits a toast/snackbar message to the UI layer.
SimpleEnvironmentFilter
A simple filter that can be used directly for simple use cases without having to extend the base EnvironmentFilter
Singleton
Classes annotated with @Singleton will generate registerSingleton function
StackRouter
An implementation of a RoutingController that handles stack navigation
StackRouterScope
Injects the given StackRouter to context so it can be looked up by any child widget
StateStreamable<State>
A Streamable that provides synchronous access to the current state.
StateStreamableSource<State>
A StateStreamable that must be closed when no longer in use.
StorageItem
Streamable<State extends Object?>
An object that provides access to a stream of states over time.
StreamUseCase<T, Params>
Base abstract class for Stream-based UseCases in Clean Architecture.
Success<T>
Represents a successful Result state.
TabPageRoute
Holds information of Tab-init and Tab-changed events used in AutoRouteAware and AutoRouterObserver
TabsRouter
An implementation of a RoutingController that handles parallel routeing
TabsRouterScope
Injects the given TabsRouter to context so it can be looked up by any child widget
TestRoute
Builds a simplified AutoRoute instance for test
ThemeCubit
An enterprise persistent ThemeCubit backed directly by SharedPreferences.
TimeoutFailure
Represents a failure when an operation times out.
Toast
An enterprise-grade, responsive Toast notification overlay system.
Transition<Event, State>
A Transition is the change from one state to another. Consists of the currentState, an event, and the nextState.
TransitionsBuilders
all of the methods in this file map to existing, already-tested flutter widgets so no-need to include them in test-coverage a class that holds presets of common route transition builder
UiFailure<T>
UiInitial<T>
UiLoading<T>
UiState<T>
Sealed UI state for data-fetching cubits — no codegen required.
UiStateBuilder<B extends StateStreamable<UiState<T>>, T>
A reactive widget that listens to a StateStreamable emitting UiState<T> and automatically builds the corresponding UI for initial, loading, success, and failure states.
UiSuccess<T>
UnexpectedFailure
Represents a generic or unexpected failure fallback.
Unit
Used instead of void as a return statement for a function when no value is to be returned.
UrlFragment
this annotation is used to mark a parameter as a url fragment e.g /path#foo
UrlState
UrlState Holds current url state in a more structured way it's used by Router as configuration state
UseCase<T, Params>
Base abstract class for asynchronous UseCases in Clean Architecture.
UseCaseSync<T, Params>
Base abstract class for synchronous UseCases in Clean Architecture.
ValidationFailure
Represents a client-side or form validation failure.
ValidatorChain
A fluent builder chain for validator rules. Extends ListBase<Validator> so it IS a List<Validator> and can be assigned directly to validators: without any <Type> arguments and without .build().
Validators
Enterprise-grade, reusable, composable field validators with automatic field label interpolation, standalone rules, and fluent builder chaining.
ViewEditDeleteButton
Enterprise-grade, reusable action component for View, Edit, and Delete operations.
WillSignalReady
If your singleton that you register wants to use the manually signalling of its ready state, it can implement this interface class instead of using the signalsReady parameter of the registration functions (you don't really have to implement much ;-) )
WrappedRoute<T extends AutoRouteWrapper>
A wrapper widget that's used by the AutoRoutePage to wrap widgets that implement AutoRouteWrapper

Enums

AdminBreakpointType
Screen breakpoint categories for responsive admin panel layouts.
AppFlavor
Supported app flavors: dev and prod.
AppLocale
Supported application locales with display labels, country codes, and RTL metadata.
DebugBannerPosition
Enum representing the 4 corner positions for DebugBanner.
DeleteConfirmationStyle
Defines how the delete confirmation prompt is displayed.
DeviceType
Device Types based on screen dimensions
DevtoolsLogLevel
DockSide
FileSourceType
Supported source types for previewing files.
FileType
Supported file formats for previewing.
FormStatus
Status of a form submission lifecycle.
LeadingType
AppBar Leading button types
LogLevel
Severity levels for FlutterLogger.
MetricCardVariant
Visual presentation variant for metric cards.
ObjectRegistrationType
You will see a rather esoteric looking test (const Object() is! T) at several places. It tests if T is a real type and not Object or dynamic. For each registered factory/singleton an ObjectRegistration<T> is created it holds either the instance of a Singleton or/and the creation functions for creating an instance when get is called
PrefValueType
StorageSource
TrendDirection
Trend trajectory direction for KPI metric cards.

Mixins

AutoRouteAwareStateMixin<T extends StatefulWidget>
a helper mixin to utilises AutoRouteAware in a better manner and reduce boilerplate code
CupertinoRouteTransitionOverrideMixin<T>
A mixin that implements methods and/or parameters of a PageRoute.
FormMixin
Mixin that provides form-level validation by combining Field instances.
JsonSerializableMixin
Optional mixin requiring toJson serialization contract for models that persist or transfer JSON data.
PredictiveBackGestureMixin
A mixin that allows you to configure predictive back gesture for a route

Extensions

AppEventContextExtension on BuildContext
Convenience extension on BuildContext for firing app events cleanly.
AppEventListenerExtension on Widget
Fluent widget extensions for declarative, zero-boilerplate composition.
AutoRouterX on BuildContext
An extension that provides common routing helpers on BuildContext
ContextExtensions on BuildContext
Ergonomic UI & theme convenience extensions on BuildContext.
DateTimeExtensions on DateTime
Ergonomic convenience extensions on DateTime.
IntExt on int
IterableIndexed on Iterable<E>
ListDynamicExt on List
MapDynamicExt on Map<String, dynamic>
NullableWidget on T?
NullExtension on T?
PaginatedStatePatterns on PaginatedState<T, F>
Adds pattern-matching-related methods to PaginatedState.
PrettyHierarchySegmentX on List<HierarchySegment>
An extension to create a pretty json output of the current hierarchy
ReadContext on BuildContext
Exposes the read method.
ResponsiveContextX on BuildContext
Extension on BuildContext for quick inline responsive properties
RouteX on Route<T>
Adds auto-route data getter to Route
SelectContext on BuildContext
Adds a select method on BuildContext.
SetX on Set<T>
StringExtensions on String
Ergonomic convenience extensions on String.
StringNullExt on String?
ValueListenableExt on ValueListenable<T>
WatchContext on BuildContext
Exposes the watch method.

Constants

dev → const Environment
preset instance of common env name
disposeMethod → const DisposeMethod
const instance of DisposeMethod with default arguments
factoryMethod → const FactoryMethod
const instance of FactoryMethod with default values
factoryParam → const FactoryParam
const instance of FactoryParam with default arguments
ignoreParam → const IgnoreParam
const instance of IgnoreParam
inheritPathParam → const PathParam
default PathParam.inherit()
injectable → const Injectable
const instance of Injectable with default arguments
injectableInit → const InjectableInit
const instance of InjectableInit with default arguments
kCupertinoModalBarrierColor → const Color
Barrier color for a Cupertino modal barrier.
kEnvironmentsFilterName → const String
kEnvironmentsName → const String
instance name for the Set of environment keys that's registered internally inside of GetItHelper
lazySingleton → const LazySingleton
const instance of LazySingleton with default arguments
microPackageInit → const InjectableInit
const instance of InjectableInit.microPackage with default arguments
module → const Module
const instance of Module with default arguments
named → const Named
const instance of Named with default arguments
order → const Order
const instance of Order with default arguments
pathParam → const PathParam
default PathParam()
postConstruct → const PostConstruct
const instance of PostConstruct with default arguments
preResolve → const PreResolve
const instance of PreResolve with default arguments
prod → const Environment
preset instance of common env name
queryParam → const QueryParam
default QueryParam()
routePage → const RoutePage
default routePage
singleton → const Singleton
const instance of Singleton with default arguments
test → const Environment
preset instance of common env name
unit → const Unit
Used instead of void as a return statement for a function when no value is to be returned.
urlFragment → const UrlFragment
default UrlFragment

Properties

sl → GetIt
Global Dependency Injection container instance powered by GetIt.
final

Functions

firebaseMessagingBackgroundHandler(RemoteMessage message) → Future<void>
Background message handler callback for FCM. Must be a top-level function.
generateColorFromString(String input) → Color
Generates a soft pastel-like Color from an input String.
generateColorFromStringFull(String input) → Color
Generates a deterministic Color from an input String.
generateShadeVariant(Color baseColor, double factor) → Color
Generates a shade variant of a given baseColor by interpolating with a factor.
inject<T extends Object>({String? instanceName, dynamic param1, dynamic param2}) → T
Syntactic sugar for retrieving a registered dependency instance T.
log(dynamic message, {LogLevel level = LogLevel.debug, String tag = 'APP', Object? error, StackTrace? stackTrace}) → void
Top-level generic helper function for logging with a custom LogLevel.
logDebug(dynamic message, {String tag = 'DEBUG', Object? error, StackTrace? stackTrace}) → void
Top-level helper function for debug logs.
logError(dynamic message, {String tag = 'ERROR', Object? error, StackTrace? stackTrace}) → void
Top-level helper function for error logs.
logInfo(dynamic message, {String tag = 'INFO', Object? error, StackTrace? stackTrace}) → void
Top-level helper function for info logs.
logWarn(dynamic message, {String tag = 'WARN', Object? error, StackTrace? stackTrace}) → void
Top-level helper function for warning logs.
throwIf(bool condition, Object error) → void
Two handy functions that help me to express my intention clearer and shorter to check for runtime errors
throwIfNot(bool condition, Object error) → void

Typedefs

ActionCallback = void Function()
Synchronous void action callback with no arguments.
AdminNavDestinationCallback = void Function(AdminNavItem item, int index)
Callback signature when an admin navigation item is selected.
AdminUserRolePredicate = bool Function(List<String>? requiredRoles)
Role-based access predicate to evaluate permission.
AnimatedIndexedStackBuilder = Widget Function(BuildContext context, Widget child)
Signature for a wrapper builder used by _AutoTabsRouterIndexedStack
AnimatedIndexedStackTransitionBuilder = Widget Function(BuildContext context, Widget child, Animation<double> animation)
Signature for a translation builder used by _AutoTabsRouterIndexedStack
AppBarBuilder = PreferredSizeWidget? Function(BuildContext context, TabsRouter tabsRouter)
Signature for a function that takes in BuildContext and TabsRouter and returns a PreferredSizeWidget usually an AppBar
AppEventHandler<E extends AppEvent> = void Function(BuildContext context, E event)
Callback invoked when a specific AppEvent E is dispatched.
AppEventRawHandler = void Function(BuildContext context, AppEvent event)
Generic callback for pattern matching with Dart 3 switch statements.
AsyncActionCallback = Future<void> Function()
Asynchronous void action callback with no arguments.
AsyncConverter<T, R> = Future<R> Function(T input)
Asynchronous data transformer/mapper signature.
AsyncValueCallback<T> = Future<void> Function(T value)
Asynchronous value callback handler.
AutoLeadingButtonBuilder = Widget Function(BuildContext context, LeadingType leadingType, VoidCallback? action)
Signature function to customize the build of a leading button
AutoRoutePageBuilder = Widget Function(RouteData data)
A Signature for a function that passes the RouteData and returns a PageRoute
AutoTabsBuilder = Widget Function(BuildContext context, List<Widget> children, TabsRouter tabsRouter)
Signature for a wrapper builder used by _AutoTabsRouterBuilder
AutoTabsPageViewBuilder = Widget Function(BuildContext context, Widget child, PageController pageController)
Signature for a wrapper builder used by _AutoTabsRouterPageView
AutoTabsTabBarBuilder = Widget Function(BuildContext context, Widget child, TabController tabController)
Signature for a wrapper builder used by _AutoTabsRouterTabBar
BlocBuilderCondition<S> = bool Function(S previous, S current)
Signature for the buildWhen function which takes the previous state and the current state and is responsible for returning a bool which determines whether to rebuild BlocBuilder with the current state.
BlocListenerCondition<S> = bool Function(S previous, S current)
Signature for the listenWhen function which takes the previous state and the current state and is responsible for returning a bool which determines whether or not to call BlocWidgetListener of BlocListener with the current state.
BlocWidgetBuilder<S> = Widget Function(BuildContext context, S state)
Signature for the builder function which takes the BuildContext and state and is responsible for returning a widget which is to be rendered. This is analogous to the builder function in StreamBuilder.
BlocWidgetListener<S> = void Function(BuildContext context, S state)
Signature for the listener function which takes the BuildContext along with the state and is responsible for executing in response to state changes.
BlocWidgetSelector<S, T> = T Function(S state)
Signature for the selector function which is responsible for returning a selected value, T, based on state.
BottomNavigationBuilder = Widget Function(BuildContext context, TabsRouter tabsRouter)
Signature for a function that takes in BuildContext and TabsRouter and returns a BottomNavigation Widget
Converter<T, R> = R Function(T input)
Synchronous data transformer/mapper signature.
CustomRouteBuilder = Route<T> Function<T>(BuildContext context, Widget child, AutoRoutePage<T> page)
Signature for custom router builder used by CustomRouteType
DeepLinkBuilder = FutureOr<DeepLink> Function(PlatformDeepLink deepLink)
Signature for a function that builds DeepLink deepLink is the pre-resolved link coming from platform window
DeepLinkTransformer = Future<Uri> Function(Uri uri)
Signature for a function that transform the incoming Uri uri is the pre-resolved uri coming from platform window This is call before the DeepLinkBuilder to allow to transform the Uri
DeferredWidgetBuilder = Widget Function()
Signature for a function that returns a widget Used in DeferredWidget to build the lazy-loaded library
DevtoolsNetworkingInspectorTabView = DevtoolsRetrofitNetworkingInspectorTabView
Semantic alias for DevtoolsRetrofitNetworkingInspectorTabView.
DisposingFunc<T> = FutureOr Function(T param)
Signature for disposing function because closures like (x){} have a return type of Null we don't use FutureOr<void>
EffectHandler = void Function(BuildContext context, FpEffect effect)
Callback signature for handling FpEffect instances.
EntityPredicate<T> = bool Function(T item)
Predicate function signature returning boolean based on input entity T.
EnvironmentFilterFunc = bool Function(Set<String>)
EventHandler<Event, State> = FutureOr<void> Function(Event event, Emitter<State> emit)
An event handler is responsible for reacting to an incoming Event and can emit zero or more states via the Emitter.
EventMapper<Event> = Stream<Event> Function(Event event)
Signature for a function which converts an incoming event into an outbound stream of events. Used when defining custom EventTransformers.
EventTransformer<Event> = Stream<Event> Function(Stream<Event> events, EventMapper<Event> mapper)
Used to change how events are processed. By default events are processed concurrently.
FactoryFunc<T> = T Function()
Signature of the factory function used by non async factories
FactoryFuncAsync<T> = Future<T> Function()
Signature of the factory function used by async factories
FactoryFuncParam<T, P1, P2> = T Function(P1 param1, P2 param2)
For Factories that expect up to two parameters if you need only one use void for the one you don't use
FactoryFuncParamAsync<T, P1, P2> = Future<T> Function(P1 param1, P2 param2)
For async Factories that expect up to two parameters if you need only one use void for the one you don't use
FailureCallback = void Function(Failure failure)
Domain failure notification handler.
FailureWidgetBuilder = Widget Function(BuildContext context, Failure failure)
Custom error widget builder signature taking BuildContext and domain Failure.
FilePreviewPage = FilePreviewContainer
Backward compatibility alias for FilePreviewContainer.
FloatingActionButtonBuilder = Widget? Function(BuildContext context, TabsRouter tabsRouter)
Signature for a function that takes in BuildContext and TabsRouter and returns a FloatingActionButton Widget or null
FpJsonValue = dynamic
Type alias for raw JSON values (primitive types, List, Map, or null).
FpNativePlugin = FpCorePlugin
Typed alias conforming to the Fp naming convention.
FutureResult<T> = Future<Result<T>>
Type alias for cleaner repository signatures. Example: FutureResult<User> instead of Future<Result<User>>
InAppWebView = InAppWebViewContainer
Backward compatibility alias for InAppWebViewContainer.
InAppWebViewPage = InAppWebViewContainer
Backward compatibility alias for InAppWebViewContainer.
IndexedItemWidgetBuilder<T> = Widget Function(BuildContext context, T item, int index)
Dynamic widget builder signature taking a context, typed item, and item index.
ItemWidgetBuilder<T> = Widget Function(BuildContext context, T item)
Dynamic widget builder signature taking a context and typed item.
JsonDecoder<T> = T Function(JsonMap json)
Decoder function signature to transform a JsonMap into a domain/data entity T.
JsonEncoder<T> = JsonMap Function(T object)
Encoder function signature to transform an object instance T into a JsonMap.
JsonList = List<Map<String, dynamic>>
Type alias for JSON list payloads (List<Map<String, dynamic>>).
JsonListDecoder<T> = List<T> Function(JsonList jsonList)
Decoder function signature to transform a JsonList into a List of domain/data entities T.
JsonMap = Map<String, dynamic>
Comprehensive Clean Architecture Type Definitions for Flutter Prakash. Type alias for standard JSON maps (Map<String, dynamic>).
LibraryLoader = Future<void> Function()
Signature for a function that returns a void future Used in DeferredWidget to load deferred libraries
Signature for a builder that returns a list of NavigatorObserver
NullableWidgetBuilder = Widget Function(BuildContext context, Widget? leading)
Signature function to provide nullable leading widget based on the current router state
OnGeneratePath = String Function(AutoRoute route)
Signature for a function that generates a path for a route name
OnNavigateCallBack = void Function(UrlState tree)
Signature of a callback used in declarative routing to report url state changes
OnNavigation = FutureOr<void> Function(NavigationResolver resolver, StackRouter router)
Signature for on navigation function used by AutoRouteGuard
OnNavigationChanged = dynamic Function(TabsRouter tabsRouter)
Signature for a callback function used by _AutoTabsRouterBuilder
OnNavigationFailure = void Function(NavigationFailure failure)
Signature for a function that takes a NavigationFailure Used in RoutingController.
OnNestedNavigateCallBack = void Function(List<RouteMatch> routes)
Signature of a callback used by declarative
PageBuilder = AutoRoutePage Function(RouteData data)
Signature for a function uses pagesMap to build an AutoRoutePage
RestorationIdBuilder = String Function(RouteMatch match)
Signature for a function that builds the page restorationId Used in AutoRoutePage
ResultFuture<T> = Future<Result<T>>
Primary Clean Architecture type alias for asynchronous operations returning a domain Result. Example: ResultFuture<User> instead of Future<Result<User>>.
ResultStream<T> = Stream<Result<T>>
Type alias for real-time stream operations yielding domain Result events over time. Example: ResultStream<User> instead of Stream<Result<User>>.
ResultSync<T> = Result<T>
Type alias for synchronous operations returning a domain Result. Example: ResultSync<User> instead of Result<User>.
ResultVoid = Future<Result<void>>
Type alias for asynchronous operations that perform an action and return void inside a domain Result. Example: ResultVoid instead of Future<Result<void>>.
RouteDataPredicate = bool Function(RouteData route)
Signature of a predicate to select RouteData
RoutePopCallBack = void Function(RouteMatch route, Page<Object?> page)
Signature of a callback to report route pop events
RoutesBuilder = List<PageRouteInfo<Object?>> Function(PendingRoutesHandler handler)
Signature of a callback used in declarative routing
ScopeDisposeFunc = FutureOr Function()
Signature for disposing function on scope level
TimeoutException = AppTimeoutException
Backwards compatibility alias for AppTimeoutException.
TitleBuilder = String Function(BuildContext context, RouteData data)
Signature for a function that builds the route title Used in AutoRoutePage
ToastOverlay = Toast
Backwards compatibility alias
Validator = String? Function(dynamic value, [String? fieldName])
A function that returns an error message or null if valid. Supports dynamic runtime value inspection and contextual fieldName / Field.labelText interpolation.
ValueCallback<T> = void Function(T value)
Single parameter value callback handler.
ValuePairCallback<T1, T2> = void Function(T1 first, T2 second)
Two-parameter value callback handler.
WidgetBuilderWithData = Widget Function(BuildContext context, RouteData data)
Signature for a function that builds a widget with RouteData

Exceptions / Errors

AppException
Base class for all data-layer exceptions.
AppTimeoutException
Thrown when an operation exceeds its specified time limit.
AuthException
Thrown when authentication or authorization fails (e.g., invalid tokens, 401/403).
CacheException
Thrown when local caching or storage fails (e.g., Hive, SharedPreferences).
CancellationException
Thrown when an asynchronous operation is explicitly cancelled by user or system.
FilePickerException
Thrown when file picking, reading, or access operations fail.
NetworkException
Thrown when there is no internet connection.
ParsingException
Thrown when a parsing or serialization error occurs.
PermissionDeniedException
Thrown when a required permission is denied or restricted.
ProviderNotFoundException
The error that will be thrown if Provider.of fails to find a Provider as an ancestor of the BuildContext used.
ServerException
Thrown when a remote server request fails (e.g., Dio, Supabase, HTTP errors).
ValidationException
Thrown when client-side input or data validation fails.
WaitingTimeOutException