growerp_core library

Classes

AboutForm
AiNavigationService
AI-powered navigation service using Google Gemini
AiPromptDialog
AI-powered navigation dialog
AppBlocObserver
AppNavObserver
AppSplashScreen
Generic Splash Screen that handles authentication state and menu loading.
AsyncRecordDialog<T>
Fetches a record by id and shows its entity dialog once loaded.
AuthBloc
Authbloc controls the connection to the backend
AuthChangePassword
AuthEvent
AuthLoad
AuthLoggedOut
AuthLogin
AuthRegister
AuthResetPassword
AuthState
AuthTest
Test helper class for authentication-related integration tests.
AuthUpdateLocal
AutocompleteLabel<T extends Object>
BlocMessageKeys
Base class for creating message key constants to avoid magic strings
BottomLoader
CacheInvalidationInterceptor
Interceptor that clears the REST cache after any successful mutating request (POST, PATCH, PUT, DELETE).
ChangeIpForm
ChatDialog
ChatMessageBloc
ChatMessageEvent
ChatMessageFetch
ChatMessageReceiveWs
ChatMessageSendWs
ChatMessageState
ChatRoomBloc
ChatRoomDelete
ChatRoomDialog
ChatRoomDialogState
ChatRoomEvent
ChatRoomFetch
ChatRoomListDialog
ChatRoomListDialogsState
ChatRoomReceiveWsChatMessage
ChatRoomState
ChatRoomUpdate
ChatRoomUpdateLocal
ChatState
ChatTest
ColorSchemeChange
CommonTest
Constant
CoreLocalizations
Callers can lookup localized strings with an instance of CoreLocalizations returned by CoreLocalizations.of(context).
DashboardCard
DashboardGrid
Responsive staggered dashboard grid with drag-to-reorder support.
DashboardMini
Shared layout for the half-height "compact graphic" dashboard tiles (used via DashboardGrid.compactGraphicRoutes): keeps the top-left corner clear for the DashboardCard icon+title, renders bars as a funnel with the counters in a row along the bottom, so every rich tile reads as one system.
DashboardMiniLoader
Fetches one REST endpoint and renders the result as a DashboardMini. Rich dashboard tiles are thin wrappers around this loader.
DataFetchBloc<T>
DataFetchBlocEvent
DataFetchState<T>
DeepLinkService
Service to handle deep linking in GrowERP applications. Listens for both custom schemes (growerp://) and HTTPS App Links/Universal Links.
DialogCloseButton
Premium dialog close button with subtle styling that matches the app's design system.
DisplayMenuItem
DisplayMenuItem - Renders menu-based navigation with GoRouter
DisplayMenuItemState
DynamicRouterConfig
Configuration for creating a dynamic app router
EmailSettingsDialog
Edits the tenant's email server (SMTP + credentials + IMAP/store). Read-modify-write: loads the full SystemSettings and resends a complete payload so the default-valued store/smtp params on update#SystemSettings do not clobber other fields. Backend syncs SMTP/store into moqui.basic.email.EmailServer so core ERP email keeps working. Returns true when settings were saved.
ErpAssessmentDialog
Post-login onboarding assessment "Set up GrowERP for your business".
EvaluationTest
Test class for evaluation period and subscription flows.
FatalErrorForm
FilterDropdown<T>
A dropdown filter widget for use with ListFilterBar
ForceUpdateDialog
A non-dismissible dialog that prompts the user to update the app when a force update is required.
ForceUpdateInfo
Holds information about a required force update
ForceUpdateScreen
A full-screen blocking widget that requires the user to update the app. Used as an overlay when force update is required, preventing any app interaction.
GetDataEvent<T>
GithubSettingsDialog
Edits the tenant's GitHub token + repository (used by the ADK GithubTool). Read-modify-write: loads the full SystemSettings and resends the complete payload (preserving the email/store fields, whose default-valued params would otherwise clobber the stored email config). llmConfigs is omitted so LLM keys are never touched. Returns true when settings were saved.
GoogleWorkspaceSettingsDialog
Edits the tenant's Google Workspace OAuth credentials (client id/secret, refresh token, calendar id) used by the Google Calendar booking capture: Meet bookings are imported as lead activities and Gemini meeting notes are attached afterwards. Read-modify-write like GithubSettingsDialog: resends the email/store slice so default-valued params don't clobber stored config. Returns true when settings were saved.
GreetingHeader
Time-of-day greeting with user first name, date, and theme toggle. Typically placed at the top of a page on tablet/desktop only.
GroupingDecorator
A styled InputDecorator for grouping form fields with consistent borders.
GrowerpDuration
Animation duration tokens for consistent motion
GrowerpRadius
Border radius tokens for consistent corner styling
GrowerpShadow
Shadow configurations for elevation effects
GrowerpSpacing
Spacing tokens for consistent layout
HelperFunctions
HomeForm
Premium home screen with animated gradient background, entrance animations, and a polished hero section for a compelling first impression.
HomeFormState
ImageButtons
KeyInterceptor
Interceptor that injects the API key and moqui session token.
ListDetail
ListFilterBar
A filter bar widget for list views following the Stitch design pattern.
LoadingIndicator
LocaleBloc
LocaleChanged
LocaleEvent
LocaleLoaded
LocaleState
LocalizedDateHelper
Helper class for working with localized dates
LoginDialog
LoginDialogState
MenuConfigBloc manages menu configuration state
Clone menu configuration for user customization
Load menu configuration for the current app
Reset menu configuration to default (copies items from default app config)
Save current menu configuration to backend
Update local menu configuration (without backend call)
Create new menu option (main menu entry)
Delete menu option
Simple data class for menu option info (to avoid model dependency)
Add a child MenuItem (tab) to a parent MenuItem
Reorder menu options (drag and drop)
Toggle menu option active status
Toggle menu item minimized state on the dashboard Minimized items are hidden from drawer/nav-rail and moved to end of dashboard
Remove a child MenuItem (tab) from parent
Update existing menu option
MultiSelect<T>
MultiSelectState<T>
Intent returned by AI for navigation
NotificationBloc
NotificationEvent
NotificationFetch
NotificationReceive
NotificationSend
NotificationState
PaymentSubscriptionDialog
Dialog for handling subscription renewal and payment
PaymentSubscriptionDialogState
PersistFunctions
RegisterUserDialog
RouteStackItem
SemanticColors
Semantic color tokens for status indicators throughout the app. Use these colors for consistent meaning across all screens.
SendResetPasswordDialog
SkeletonDashboardCard
A skeleton layout for dashboard cards
SkeletonListItem
A skeleton layout for list items with avatar, title, and subtitle
SkeletonLoader
A skeleton loading placeholder widget with shimmer animation.
SkeletonTable
A skeleton layout for data tables
SkeletonWidget
Shared test-mode flag for all skeleton loading animations.
SparklineChart
A mini sparkline chart widget for displaying trend data in compact spaces.
SparklineTrend
A widget that combines a SparklineChart with a trend label
SplashForm
StartupCredentials
Credentials handed off by the web startup page (see admin/web/index.html).
StaticRouterConfig
Configuration for creating a static app router for example apps.
StatusChip
A semantic status chip widget for displaying status indicators.
StyledActionButton
A styled action button for use in detail cards.
StyledAvatar
A styled avatar widget following the Stitch design system. Used for displaying user/company profile images with premium styling.
StyledAvatarSmall
A small styled avatar for use in lists and compact views.
StyledColumn
Column definition for StyledDataTable
StyledContactRow
A styled contact link row with appropriate icons and tap actions.
StyledDataTable
A styled data table following the Stitch Orders Management design pattern.
StyledDetailCard
A styled detail card widget following the Stitch design system. Used for displaying grouped information in user/company detail views.
StyledDetailHeader
A styled header section for detail views with avatar, name, and status.
StyledImageUpload
A styled image upload widget following the Stitch design system. Displays a compact horizontal layout with avatar preview, upload instructions, and remove button.
StyledInfoRow
A styled info row for displaying label-value pairs in detail views.
StyledTableHeader
A styled table header row following the Stitch design pattern
StyledToggleRow
A styled toggle row for boolean settings in detail views.
SubscriptionWarningHelper
Helper class for managing subscription expiration warning dialogs.
SystemSetupDialog
System Setup Screen — configures AI (LLM provider API keys). Settings are stored per-tenant in the backend via the SystemSettings REST endpoint. Email and GitHub credentials are configured from the ADK Tools & integrations screen (EmailSettingsDialog / GithubSettingsDialog).
TenantSetupDialog
Dialog for collecting tenant setup information (company name, currency, demo data) This is shown to admin users after registration to complete tenant setup.
TenantSetupDialogState
ThemeBloc
ThemeEvent
ThemeModeGet
ThemePickerDialog
Premium theme picker dialog with gradient header, animated mode toggle, and polished color scheme tiles.
ThemeState
ThemeSwitch
TimeZoneHelper
Helper class for handling timezone differences between client and server
TopApp
TopApp is the main application wrapper that provides all core functionality.
TrialWelcomeDialog
Welcomes new tenant admins, showing company/user info and trial period. Shown once after tenant setup completes.
WidgetMetadata
Metadata for a registered widget (for AI navigation)
WidgetRegistry
Composable Widget Registry with AI discovery support
WsClient

Enums

AuthStatus
ChatMessageStatus
ChatRoomStatus
ContactType
DataFetchStatus
NotificationStatus
StatusChipSize
Size variants for StatusChip
StatusType
Semantic status types for the StatusChip widget.

Mixins

DataFetchBlocOther<T>

Extensions

CustomizableDateTime on DateTime
DateOnly on DateTime?
DateOnlyCompare on DateTime
DateOnlyLocalized on DateTime?
Extension for backward compatibility and convenience
DateTimeSafeParser on String
DateTimeUtc on DateTime
GrowerpTypography on TextTheme
Typography scale extensions for TextTheme
LastChar on String
LocalizedDateFormat on DateTime?
Extension for locale-aware date formatting with Buddhist Era support
Noon on DateTime?
SemanticColorScheme on ColorScheme
Extension on ColorScheme to provide semantic colors
StringExtension on String
StringTruncation on String?
UsCurrency on Decimal?
currency extension to display currencies with a symbol and amount separated US style with ',' and '.' when currency is missing no ',' is displayed to avoid input format problems

Constants

compactGraphicLogoInset → const double
Dashboard card widget with glassmorphism, gradients, and animations.
curatedSchemes → const List<FlexScheme>
A curated list of FlexScheme options for user selection. These are chosen for their professional appearance and variety.
darkColorScheme → const ColorScheme
growerpPremium → const FlexSchemeData
lightColorScheme → const ColorScheme

Properties

iconRegistry Map<String, Icon>
Registry mapping icon names to Icon objects. Icon names are stored in the database, and this registry maps them to actual Flutter Icon widgets.
final

Functions

appBarTitle(BuildContext context, String title, bool isPhone) Widget
authDroppable<E>(Duration duration) → EventTransformer<E>
buildDioClient({Duration timeout = const Duration(seconds: 60), String? overrideUrl}) Future<Dio>
Builds a Dio client configured with authentication, logging, and HTTP response caching.
chatMessageDroppable<E>(Duration duration) → EventTransformer<E>
chatRoomDroppable<E>(Duration duration) → EventTransformer<E>
clearRestCache() Future<void>
Clears the entire REST cache.
confirmDeleteUserComp(BuildContext context, UserGroup? userGroup) Future<bool?>
dialog returns true when company delete, false when not, null when cancelled
confirmDialog(BuildContext context, String title, String content) Future<bool?>
dialog returns true when continue, false when cancelled
coreRoute(RouteSettings settings) Route
createDynamicAppRouter(List<MenuConfiguration> configurations, {required DynamicRouterConfig config, GlobalKey<NavigatorState>? rootNavigatorKey}) → GoRouter
createJsonObject<T>(T object, T Function(String json) toJson()) String
createStaticAppRouter({required MenuConfiguration menuConfig, required String appTitle, required Widget widgetBuilder(String route), Widget? dashboard, List<RouteBase> shellRoutes = const [], List<RouteBase> additionalRoutes = const [], List<Widget>? mainRouteActions, Widget? mainRouteFab, Widget tabWidgetLoader(String widgetName, Map<String, dynamic> args)?}) → GoRouter
Creates a static GoRouter for example apps.
dataEventDroppable<E>(Duration duration) → EventTransformer<E>
entityFromArgs<T>(Map<String, dynamic>? args, T fromJson(Map<String, dynamic>)) → T?
Build a typed entity from a chat directive's flat params map.
getBackendUrlOverride(String applicationId, String version) Future<ForceUpdateInfo>
Checks if there is an override for the production/test backend URL Updates the GlobalConfiguration with the new backend URL if available Returns ForceUpdateInfo if a force update is required
getCoreBlocProviders(RestClient restClient, WsClient chatClient, WsClient notificationClient, String applicationId, Company? company) List<BlocProvider<StateStreamableSource<Object?>>>
getDioError(dynamic e) Future<String>
getIconByName(String? iconName) Icon?
Get an Icon by its name from the registry. Returns null if the icon name is not found.
getIconFromRegistry(String? iconName) Icon?
Alias for getIconByName for consistency with widget code.
getJsonObject<T>(String result, T fromJson(Map<String, dynamic> json)) → T
getKeyFromArgs(Map<String, dynamic>? args) Key?
Parse a key from args
getRestCacheStore() → MemCacheStore
Returns the global MemCacheStore used for REST caching.
getStartupCredentials() StartupCredentials?
Returns the credentials supplied by the web startup page, or null when none were supplied (always null on non-web platforms). The values are cleared from sessionStorage after being read so they are consumed once.
getStatsForRoute(String? route, Stats? stats) String?
Maps menu option routes to their corresponding statistics from the Stats model.
getStatusTypeFromString(String status) StatusType
Helper function to get StatusType from common status strings
injectAdminSetup(MenuConfiguration config) → MenuConfiguration
Creates a dynamic GoRouter based on menu configurations.
isAiPrefill(Map<String, dynamic>? args) bool
True when args carry an AI-prefill marker (set by chat directives so the opened dialog can show a "review & Save" banner).
isAPhone(BuildContext context) bool
isLargerThanPhone(BuildContext context) bool
isPhone(BuildContext context) bool
lookupCoreLocalizations(Locale locale) CoreLocalizations
myDrawer(BuildContext context, bool isPhone, List<MenuItem> menu) Widget?
Premium drawer widget with gradient styling, enhanced user profile, and polished menu items for a modern mobile experience.
myNavigationRail(BuildContext context, Widget child, int menuIndex, List<MenuItem> menu) Widget
Premium navigation rail with gradient background, animated selections, and glassmorphism styling for a modern, sophisticated look.
notificationDroppable<E>(Duration duration) → EventTransformer<E>
parseFinDocType(String? typeName) → FinDocType
Parse FinDocType from string
parseRole(String? roleName) → Role
Parse Role from a string. Accepts the enum name (company/customer/lead/ supplier), the backend value (OrgInternal/Customer/Lead/Supplier), and common synonyms — notably "employee"/"staff"/"internal" → Role.company (OrgInternal, the organization's own employees).
Premium popup dialog with gradient header matching the app's design system.
popUpDialog({required BuildContext context, required List<Widget> children, String title = '', double height = 400, double width = 400, Key key = const Key('popUp')}) Widget
Premium popup dialog with gradient header matching the app's design system.
popUpDialogNoScaffold({required BuildContext context, required List<Widget> children, String title = '', double height = 400, double width = 400, Key key = const Key('popUp')}) Widget
Premium popup dialog without scaffold, with gradient header matching the app's design system.
setTestDaysOffset(int daysOffset) → void
Set a days offset for testing time-dependent features. This affects both frontend date (CustomizableDateTime) and backend date (applied during login for subscription checks, etc.).
snackBar(BuildContext context, Color color, String message, {int? seconds}) SnackBar
snackBarDuration(Color color, {int? seconds}) Duration
translateAuthBlocMessage(String? messageKey, CoreLocalizations localizations) String
Translate Auth BLoC message keys to localized strings
translateBlocMessage(dynamic localizations, String messageKey, {Map<String, dynamic>? params}) String
Translates a BLoC message key to a localized string using the provided localizations object.
translateBlocMessageTyped({required String messageKey, required String translator(String)}) String
Helper function to translate BLoC messages in the UI layer with type-safe localizations
translateChatMessageBlocMessage(String? messageKey, CoreLocalizations localizations) String
Translate ChatMessage BLoC message keys to localized strings
translateChatRoomBlocMessage(String? messageKey, CoreLocalizations localizations) String
Translate ChatRoom BLoC message keys to localized strings
translateNotificationBlocMessage(String? messageKey, CoreLocalizations localizations) String
Translate Notification BLoC message keys to localized strings

Typedefs

ColorSchemePickerDialog = ThemePickerDialog
Legacy alias for backward compatibility
DashboardBar = ({Color? color, int count, String label})
One labelled proportional bar in a DashboardMini funnel.
DashboardCounter = ({String label, int value})
One headline number in the bottom counter row of a DashboardMini.
DashboardMiniData = ({List<DashboardBar> bars, List<DashboardCounter> counters})
Bars + counters produced by a DashboardMiniLoader data loader.
GrowerpWidgetBuilder = Widget Function(Map<String, dynamic>? args)
Type definition for widget builder functions Named GrowerpWidgetBuilder to avoid conflict with Flutter's WidgetBuilder