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
ApiVersionProvider
Version provider that fetches from an API endpoint
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
BounceAnimation
Bounce animation - subtle scale bounce effect
BreatheAnimation
Breathe animation - smooth breathing scale + opacity effect
CommonLoggerHelper
Helper class for logging utilities
ConfigFileProvider
Version provider that reads from app_config.json
CoreSpacer
DateTimeHelper
Helper class for date and time operations
DevGridOverlay
DeviceInfoHelper
DeviceInfoHelperBase
DiamondClipper
Diamond shape clipper for skeleton
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
FirebaseProvider
Firebase Cloud Messaging (FCM) Provider
FirstLetterCapitalizeHelper
Helper class for string capitalization
FooterArea
Footer area widget that only allows a CoreSpacer of type footer.
ForceUpdateConfig
Configuration for ForceUpdateHelper
ForceUpdateHelper
Force Update Helper
ForceUpdateScreen
Full screen blocking page for force updates
ForceUpdateStrings
Customizable strings for the update UI
GlowAnimation
Glow animation - pulsing brightness effect
GradientFlowAnimation
Gradient Flow animation - smooth flowing gradient effect
Grid
Grid layout system utilities
GridHelper
Helper class for grid layout calculations
HexagonClipper
Hexagon shape clipper for skeleton
HtmlStyleConfig
Configuration class for styling HTML content
HtmlViewer
HTML Viewer Widget with sanitization support
HtmlViewerCubit
Cubit for managing HTML viewer state
HtmlWidget
Converts HTML content to Flutter widgets programmatically
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 Supports multiple storage backends: SharedPreferences (default) and HiveCE
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.
NoAnimation
No animation - static skeleton
NotificationActionResult
Notification Action Result
OnboardingConfig
Onboarding configuration
OnboardingCubit ViewModels
๐ŸŽฏ Onboarding Cubit
OnboardingPageModel
Onboarding page model
OnboardingState States
๐ŸŽฏ Onboarding State
OnboardingStorageHelper
OnboardingView Views
๐ŸŽฏ Onboarding View
OneSignalProvider
OneSignal Push Notification Provider
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
ProviderConfig
Provider Configuration
PulseAnimation
Pulse animation - fade in/out effect
PushNotificationConfig
Push Notification Configuration
PushNotificationData
Push Notification Data
PushNotificationHelper
Push Notification Helper
PushNotificationProviderBase
Push Notification Provider Base
RawHtmlViewer
Raw HTML Viewer Widget - renders HTML without sanitization
RemoteConfigAdapter
Abstract interface for Firebase Remote Config This allows the helper to work without a hard dependency on Firebase
RemoteConfigProvider
Version provider that uses Firebase Remote Config
RemoteConfigSettings
Configuration for Firebase Remote Config provider
Result<T>
RichPluralResolvers
Rich plural resolvers
SearchCubit ViewModels
๐Ÿ” Search Cubit
SearchState States
๐Ÿ” Search State
SearchView Views
๐Ÿ” Search View
ShimmerAnimation
Shimmer animation - gradient sweep effect
SkeletonAnimation
Base class for skeleton animations
SkeletonArticle
Article skeleton with title, image, and paragraphs
SkeletonAvatar
Avatar skeleton widget
SkeletonBase
Base skeleton widget that all skeleton shapes extend from
SkeletonCard
Card skeleton with image and content
SkeletonCircle
Circle skeleton widget
SkeletonConfig
Configuration for skeleton widgets
SkeletonCustom
Custom shape skeleton widget using a custom clipper
SkeletonGrid
Grid of skeleton items
SkeletonHelper
Skeleton Helper
SkeletonListItem
List item skeleton with avatar and text lines
SkeletonParagraph
Multi-line text skeleton (paragraph)
SkeletonProduct
Product card skeleton
SkeletonProductHorizontal
Horizontal product skeleton
SkeletonProfile
Profile header skeleton
SkeletonProfileHorizontal
Horizontal profile skeleton (for list items)
SkeletonRectangle
Rectangle skeleton widget
SkeletonRounded
Rounded rectangle skeleton widget
SkeletonSocialPost
Social media post skeleton
SkeletonStory
Story/reel thumbnail skeleton
SkeletonStoryRow
Row of story skeletons
SkeletonText
Text line skeleton widget
SkeletonTheme
Theme widget for providing consistent skeleton configuration to descendants
SlideAnimation
Slide animation - sliding highlight band
SliverSkeletonGrid
Sliver grid for use in CustomScrollView
Spacer
Spacing utilities for consistent UI spacing
SpacerConfig
SpacerHelper
Helper class for UI spacing utilities
SpacerVisibility
๐ŸŽจ Option type for spacer visibility and custom type
SparkleAnimation
Sparkle animation - twinkling sparkle points effect
SplashConfigModel Models
๐Ÿš€ OSMEA Splash Models
SplashCubit ViewModels
๐Ÿš€ OSMEA Splash Cubit
SplashState
๐Ÿš€ Splash state class
SplashView Views
๐Ÿš€ OSMEA Splash View
StarClipper
Star shape clipper for skeleton
StoreConfig
Configuration for app store URLs
StoreRedirector
Handles redirecting users to app stores
StyledHtmlViewer
Styled HTML Viewer Widget - renders HTML with custom style configuration
SvgConfig
Configuration class for SVG rendering options
SvgHelper
Helper class for rendering SVG images from various sources
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
UpdateAlertDialog
Alert dialog for displaying update prompts
UpdateBottomSheet
Bottom sheet for displaying update prompts
UpdateInfo
Contains information about an available update
UrlLauncherHelper
Helper class for launching URLs and external applications
VersionComparator
Utility for comparing semantic versions
VersionComponents
Parsed version components
VersionData
Raw version data from a provider
VersionProvider
Abstract interface for version providers
WaveAnimation
Wave animation - expanding circle wave effect
WebViewer
Web Viewer Widget - displays web pages with navigation controls
WebViewerCubit
Cubit for managing WebView state
WebViewerHelper
Unified Web Viewer Helper

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
LocalStorageType
LocalStorageType enum for selecting storage backend
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).
NotificationPermissionStatus
Notification Permission Status
PushNotificationProviderType
Push Notification Provider Types
SkeletonAnimationType
Animation types for skeleton loading effects
SkeletonAvatarStyle
Avatar style for skeleton
SkeletonDirection
Direction for shimmer animation
SkeletonShapeType
Shape types for skeleton widgets
SplashAction
๐ŸŽฏ Splash actions
SplashFlowState
๐Ÿ“ฑ Splash state
SplashStatus States
๐Ÿš€ OSMEA Splash State
SplashStyle
๐ŸŽจ Splash style options
UpdateType
Defines the type of update required
UpdateUIType
Defines the UI style for displaying update prompts
VersionProviderType
Provider type for version checking

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.

Extensions

AppLocaleUtilsExt on BaseAppLocaleUtils<E, T>
BuildContextTranslationsExtension on BuildContext
Method B shorthand via BuildContext extension method. Configurable via 'translate_var'.
DoubleExtension on double
Extension methods for double values
ExtAppLocale on BaseAppLocale<BaseAppLocale, BaseTranslations>
ExtAppLocaleUtils on BaseAppLocaleUtils<E, T>
ExtBaseLocaleSettings on BaseFlutterLocaleSettings<E, T>
LocaleSettingsExt on BaseLocaleSettings<E, T>
PushNotificationProviderTypeExtension on PushNotificationProviderType
Extension to convert string to PushNotificationProviderType
SkeletonAnimationTypeExtension on SkeletonAnimationType
Extension for SkeletonAnimationType
SkeletonDirectionExtension on SkeletonDirection
Extension for SkeletonDirection
SkeletonShapeTypeExtension on SkeletonShapeType
Extension for SkeletonShapeType
SkeletonThemeExtension on BuildContext
Extension to easily get skeleton config from BuildContext
UpdateTypeExtension on UpdateType
Extension for UpdateType serialization
UpdateUITypeExtension on UpdateUIType
Extension for UpdateUIType

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.
OnLaterCallback = void Function(UpdateInfo info)
Callback when user taps later
OnSkipCallback = void Function(UpdateInfo info)
Callback when user taps skip
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)
OnUpdateCallback = void Function(UpdateInfo info)
Callback when user taps update
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