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
- 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
- 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
BaseViewHydratedCubitinto a consistent layout, complete with app bar, spacing, snackbars, and route helpers. Extend this widget when building a screen whose state comes from aBaseViewModelHydratedCubitso 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
MasterViewHydratedCubitunderstands 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.
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>
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