masterfabric_core library

MasterFabric Core Package

Core utilities, base classes, and shared logic for the MasterFabric Flutter project.

Classes

AccountCubit ViewModels
πŸ‘€ Account Cubit
AccountState States
πŸ‘€ Account State
AccountView Views
πŸ‘€ Account View
AppBarPaddingVisibility
πŸ“± Option type for app bar padding visibility and custom value
ApplicationShareHelper
Helper class for content sharing
AppLocaleUtils
Provides utility functions without any side effects.
AppRoutes
Route definitions for the app
AssetConfigHelper
πŸ—‚οΈ AssetConfigHelper: A utility class for reading and managing JSON configuration files from assets
AuthCubit ViewModels
πŸ” Authentication Cubit
AuthState
πŸ” Auth state class
AuthStorageHelper
Helper class for authentication data persistence
AuthView Views
πŸ” Authentication View
BaseAppLocale<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Similar to flutter locale but available without any flutter dependencies. Subclasses will be enums.
BaseAppLocaleUtils<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Provides utility functions without any side effects.
BaseFlutterLocaleSettings<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Similar to BaseLocaleSettings but actually implements the updateProviderState method.
BaseLocaleSettings<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
BaseTranslationProvider<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
BaseTranslations<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Root translation class of ONE locale Entry point for every translation
BaseView<V extends BaseViewModelBloc<E, S>, E, S>
🌟 BaseView is a generic widget that provides a convenient way to use BLoC and ViewModel patterns together. It handles ViewModel lifecycle, state listening, and error reporting in a single place.
BaseViewCubit<V extends BaseViewModelCubit<S>, S>
A base widget that provides a standardized way to work with Cubit-based view models This widget handles the lifecycle of view models and provides callbacks for different events
BaseViewHydratedCubit<V extends BaseViewModelHydratedCubit<S>, S>
BaseViewModelBloc<E, S>
🧩 Base class for all ViewModel Blocs. Provides logging and state management utilities.
BaseViewModelCubit<S>
🌟 BaseViewModelCubit is an abstract base class that extends Flutter's Cubit for state management. It provides a standardized foundation for all Cubit-based view models in the application.
BaseViewModelHydratedCubit<S>
Minimal hydrated base for Cubit view models.
BaseViewState<T>
🎯 BaseViewState provides a standardized state pattern for all viewer components.
BaseViewStateContent<T>
βœ… Content state - indicates operation succeeded with data
BaseViewStateError<T>
❌ Error state - indicates operation failed with error message
BaseViewStateLoading<T>
πŸ”„ Loading state - indicates async operation is in progress
CommonLoggerHelper
Helper class for logging utilities
CoreSpacer
DateTimeHelper
Helper class for date and time operations
DevGridOverlay
DeviceInfoHelper
DeviceInfoHelperBase
EmptyView Views
πŸ“­ Empty View
EmptyViewCubit ViewModels
πŸ“­ Empty View Cubit
EmptyViewModel
Empty state configuration model
EmptyViewState States
πŸ“­ Empty View State
ErrorAction
Error action model
ErrorHandlingCubit ViewModels
❌ Error Handling Cubit
ErrorHandlingState States
❌ Error Handling State
ErrorHandlingView Views
❌ Error Handling View
ErrorModel
Error handling data model
FakeAppLocale
FakeTranslations
FileDownloadHelper
Helper class for file downloads with progress tracking
FirstLetterCapitalizeHelper
Helper class for string capitalization
FooterArea
Footer area widget that only allows a CoreSpacer of type footer.
Grid
Grid layout system utilities
GridHelper
Helper class for grid layout calculations
ImageDetailCubit ViewModels
πŸ–ΌοΈ Image Detail Cubit
ImageDetailState States
πŸ–ΌοΈ Image Detail State
ImageDetailView Views
πŸ–ΌοΈ Image Detail View
InfoAction
Info action model
InfoBottomSheetCubit ViewModels
ℹ️ Info Bottom Sheet Cubit
InfoBottomSheetState States
ℹ️ Info Bottom Sheet State
InfoBottomSheetView Views
ℹ️ Info Bottom Sheet View
InfoModel
Info bottom sheet configuration model
InheritedLocaleData<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
LoadingConfig
Loading configuration
LoadingCubit ViewModels
⏳ Loading Cubit
LoadingModel
Loading state configuration model
LoadingState States
⏳ Loading State
LoadingView Views
⏳ Loading View
LocaleSettings
Manages all translation instances and the current locale
LocalNotificationHelper
Helper class for local push notifications
LocalStorageHelper
Helper class for local storage operations using SharedPreferences
MasterApp
πŸš€ MasterApp: The main entry point for the application. Initializes configuration (asset), and wires the root router.
MasterScaffoldWidget
πŸ—οΈ Flexible scaffold widget that adapts based on parameters
MasterView<V extends BaseViewModelBloc<E, S>, E, S>
MasterView (BLoC-based) β€” reusable screen scaffold for feature views.
MasterViewCubit<V extends BaseViewModelCubit<S>, S>
Cubit-based Master View
MasterViewHydratedCubit<V extends BaseViewModelHydratedCubit<S>, S>
Hydrated Cubit-based master view scaffold that wires a BaseViewHydratedCubit into a consistent layout, complete with app bar, spacing, snackbars, and route helpers. Extend this widget when building a screen whose state comes from a BaseViewModelHydratedCubit so that the UI automatically reacts to hydrated state changes.
Navbar area widget that only allows a CoreSpacer of type navbar.
OnboardingConfig
Onboarding configuration
OnboardingCubit ViewModels
🎯 Onboarding Cubit
OnboardingPageModel
Onboarding page model
OnboardingState States
🎯 Onboarding State
OnboardingStorageHelper
OnboardingView Views
🎯 Onboarding View
PaddingVisibility
πŸ“ Option type for padding visibility and custom value
PermissionHandlerBase
Abstract base class for permission handling
PermissionHandlerHelper
Helper class for runtime permissions
PermissionResult
Model for permission request result
PermissionsCubit ViewModels
πŸ” Permissions Cubit
PermissionsState States
πŸ” Permissions State
PermissionsView Views
πŸ” Permissions View
PluralResolvers
Default plural resolvers
PriceInfoCurrencyHelper
Helper class for currency formatting
Result<T>
RichPluralResolvers
Rich plural resolvers
SearchCubit ViewModels
πŸ” Search Cubit
SearchState States
πŸ” Search State
SearchView Views
πŸ” Search View
Spacer
Spacing utilities for consistent UI spacing
SpacerConfig
SpacerHelper
Helper class for UI spacing utilities
SpacerVisibility
🎨 Option type for spacer visibility and custom type
SplashConfigModel Models
πŸš€ OSMEA Splash Models
SplashCubit ViewModels
πŸš€ OSMEA Splash Cubit
SplashState
πŸš€ Splash state class
SplashView Views
πŸš€ OSMEA Splash View
TranslationMetadata<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>
Metadata instance hold by the root translation class.
TranslationOverridesFlutter
TranslationProvider
Method B: Advanced
Translations
TranslationsAccountEn
TranslationsAuthEn
TranslationsCommonEn
TranslationsEmptyViewEn
TranslationsErrorEn
TranslationsImageDetailEn
TranslationsLoadingEn
TranslationsOnboardingEn
TranslationsPermissionsEn
TranslationsSearchEn
TranslationsSplashEn
UrlLauncherHelper
Helper class for launching URLs and external applications
WebViewerHelper
Helper class for WebView rendering

Enums

AppLocale
Supported locales.
AuthTabType States
πŸ” Authentication State
CoreSpacerType
Enum for all core spacer types
EmptyViewType
Empty view type enum
ErrorType
Error type enum
InfoActionType
Info action type enum
LoadingType
Loading type enum
MasterViewCubitTypes
High-level screen states for MasterViewCubit scaffolding and messaging.
MasterViewHydratedCubitTypes
Named view states that MasterViewHydratedCubit understands to drive UI and snackbar behaviour. Choose the type that best maps to the current screen context; the base class handles how each state is surfaced.
MasterViewTypes
High-level screen states for MasterView (BLoC-based).
SplashAction
🎯 Splash actions
SplashFlowState
πŸ“± Splash state
SplashStatus States
πŸš€ OSMEA Splash State
SplashStyle
🎨 Splash style options

Mixins

MasterViewCubitMixin
Shared UI helpers for MasterViewCubit-based screens.
MasterViewHydratedCubitMixin
MasterViewMixin
Shared UI helpers for MasterView (BLoC-based). Keep helpers minimal; compose richer UIs in concrete views.

Properties

getIt β†’ GetIt
GetIt instance
final
globalDevModeSpacer ↔ bool
getter/setter pair
resources β†’ Translations
Method A: Simple
no setter

Functions

configureDependencies() β†’ Future<void>
Initialize dependency injection

Typedefs

BuilderCondition<S> = bool Function(S? previous, S? current)
πŸ”„ Type definition for a condition to determine whether the builder should be called. Returns true if the widget should rebuild.
BuilderConditionCubit<S> = bool Function(S? previues, S? current)
πŸ”„ Type definition for a condition to determine whether the builder should be called. Returns true if the widget should rebuild.
BuilderConditionHydratedCubit<S> = bool Function(S? previous, S? current)
InlineSpanBuilder = InlineSpan Function(String)
🧭 Type definition for navigation actions.
OnStateListener<S> = void Function(BuildContext context, Object? state)
🎧 Type definition for a listener that reacts to state changes.
OnStateListenerCubit<S> = void Function(BuildContext context, S? state)
🎧 Type definition for a listener that reacts to state changes.
OnStateListenerHydratedCubit<S> = void Function(BuildContext context, S? state)
OnViewModelEnd<V> = void Function(V viewModel)
🧹 Type definition for a callback that is called when the ViewModel is about to be disposed. Useful for cleaning up resources.
OnViewModelEndCubit<V> = void Function(V viewModel)
🧹 Type definition for a callback that is called when the ViewModel is about to be disposed. Useful for cleaning up resources.
OnViewModelEndHydratedCubit<V> = void Function(V viewModel)
OnViewModelReady<V> = void Function(V viewModel, BuildContext context)
πŸ§‘β€πŸ’» Type definition for a callback that is called when the ViewModel is ready. Useful for initializing data or starting listeners.
OnViewModelReadyCubit<V> = void Function(V viewModel)
πŸ§‘β€πŸ’» Type definition for a callback that is called when the ViewModel is ready. Useful for initializing data or starting listeners.
OnViewModelReadyHydratedCubit<V> = void Function(V viewModel)
OnViewModelStaeBuilderCubit<V, S> = Widget Function(V viewModel, BuildContext context, S state)
πŸ–ΌοΈ Type definition for the builder function that builds the UI based on the ViewModel and state.
OnViewModelStateBuilder<V, S> = Widget Function(V viewModel, BuildContext context, S state)
πŸ–ΌοΈ Type definition for the builder function that builds the UI based on the ViewModel and state.
OnViewModelStateBuilderHydratedCubit<V, S> = Widget Function(V viewModel, BuildContext context, S state)
PluralResolver = String Function(num n, {String? few, String? many, String? one, String? other, String? two, String? zero})
Selects the correct string depending on n
ShowBanner = void Function({Color? backgroundColor, required Widget content, Duration? duration})
πŸͺ§ Type definition for showing a banner.
ShowBottomSheet = Future<T?> Function<T>({Color? backgroundColor, required WidgetBuilder builder, bool isScrollControlled})
πŸͺŸ Type definition for showing a bottom sheet.
ShowDialog = Future<T?> Function<T>({bool barrierDismissible, required WidgetBuilder builder})
πŸͺŸ Type definition for showing a dialog.
TranslationsEn = Translations