masterfabric_core 0.0.13
masterfabric_core: ^0.0.13 copied to clipboard
Core utilities, base classes, and shared logic for the MasterFabric Flutter project.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.13 - 2026-01-09 #
Added #
MasterScaffold Drawer Support
- Drawer parameter - Added optional
drawerparameter toMasterScaffoldWidget- Allows passing a drawer widget to the underlying Scaffold
- Fully integrated with
MasterViewCubitconstructor - Drawer is passed through the constructor chain and connected to Scaffold
- MasterViewCubit drawer support - Added
drawerparameter toMasterViewCubitconstructor- Optional
Widget? drawerfield for drawer configuration - Automatically passed to
MasterScaffoldWidgetfor rendering
- Optional
Usage Example #
class MyView extends MasterViewCubit<MyViewModel, MyState> {
MyView({super.key}) : super(
drawer: MyDrawerWidget(), // Your drawer widget here
// ... other parameters
);
}
0.0.12 - 2026-01-09 #
Changed #
Dependency Optimization
- Removed
httppackage - Eliminated redundant HTTP client dependency - Unified HTTP client -
ApiVersionProvidernow usesdioinstead ofhttp- Better error handling with
DioException - Consistent with other HTTP operations in the codebase
- Proper resource cleanup with
dispose()
- Better error handling with
Removed #
http: ^1.2.0dependency from pubspec.yaml
0.0.11 - 2026-01-09 #
Changed #
Example App Architecture Refactoring
-
Views-Only Pattern: Restructured example app to follow
lib/src/views/pattern- Each view folder now contains:
*_view.dart,cubit/, and optionalmodels/ - Consolidated
features/andviews/into singleviews/folder - Clean separation of UI and business logic within same folder structure
- Each view folder now contains:
-
Folder Structure:
views/ ├── home/ │ ├── home_view.dart │ └── cubit/ │ ├── home_cubit.dart │ └── home_state.dart ├── products/ │ ├── products_view.dart │ ├── models/ │ │ └── product.dart │ └── cubit/ ├── profile/ │ └── ... └── helpers/ ├── helpers_hub_view.dart ├── config/ │ ├── config_view.dart │ └── cubit/ ├── datetime/ ├── device_info/ ├── download/ ├── force_update/ ├── package_info/ ├── permissions/ ├── push_notification/ ├── share/ ├── skeleton/ ├── storage/ │ ├── storage_view.dart │ ├── cubit/ │ └── hive_ce/ ├── svg/ ├── url_launcher/ └── web_viewer/ -
Naming Convention: Replaced "Demo" keyword with "Cases" throughout
- Route names:
deviceInfoDemo→deviceInfoCases, etc. - File names:
web_viewer_demo_view.dart→web_viewer_cases_view.dart - Class names:
WebViewerDemoView→WebViewerCasesView
- Route names:
Enhanced Home View
- Hero Card: Package description with version badge and gradient background
- Author Section: Added author info with GitHub link (@gurkanfikretgunak)
- Architecture Overview: New section explaining MasterViewCubit, BaseViewModelCubit, Injectable DI, GoRouter
- Getting Started Guide: 4-step code guide with code snippets
- Navigation Cards: Enhanced with subtitles and descriptions
- Footer: "Built with MasterFabric Core" branding
Fixed #
- Removed unnecessary debug UI elements from home view
- Simplified home cubit (removed loading/error states for static content)
0.0.10 - 2026-01-08 #
Added #
Skeleton Loading Helper Module
-
SkeletonHelper- Comprehensive skeleton loading helper with static factory methods- Shape methods:
rectangle(),circle(),rounded(),text(),paragraph(),avatar(),custom() - Preset methods:
listItem(),card(),cardHorizontal(),profile(),profileHorizontal(),article(),product(),productHorizontal(),grid(),productGrid(),socialPost(),story(),storyRow() - Utility methods:
list(),repeat(),loadingState()
- Shape methods:
-
Animation Types (10 styles):
SkeletonAnimationType.shimmer- Gradient sweep from left to rightSkeletonAnimationType.pulse- Fade in/out opacity animationSkeletonAnimationType.wave- Ripple/wave effect animationSkeletonAnimationType.glow- Glowing border/shadow effectSkeletonAnimationType.slide- Sliding highlight bandSkeletonAnimationType.bounce- Subtle scale bounce effectSkeletonAnimationType.breathe- Smooth breathing scale animationSkeletonAnimationType.gradientFlow- Flowing multi-color gradientSkeletonAnimationType.sparkle- Random sparkle points effectSkeletonAnimationType.none- Static skeleton with no animation
-
Shape Widgets:
SkeletonRectangle- Basic rectangle shapeSkeletonCircle- Circle shapeSkeletonRounded- Rounded rectangle shapeSkeletonText- Text line placeholderSkeletonParagraph- Multi-line text placeholderSkeletonAvatar- Avatar placeholder (circle or rounded)SkeletonCustom- Custom shape using ClipPath- Custom clippers:
DiamondClipper,HexagonClipper,StarClipper
-
Preset Widgets:
SkeletonListItem- List item with avatar and text linesSkeletonCard- Card with image and contentSkeletonProfile- Profile header skeletonSkeletonProfileHorizontal- Horizontal profile skeletonSkeletonArticle- Article with title, image, and paragraphsSkeletonProduct- Product card skeletonSkeletonProductHorizontal- Horizontal product cardSkeletonGrid- Grid of skeleton itemsSliverSkeletonGrid- Sliver grid for CustomScrollViewSkeletonSocialPost- Social media post skeletonSkeletonStory- Story thumbnail skeletonSkeletonStoryRow- Row of story skeletons
-
Configuration:
SkeletonConfig- Configuration class with animation type, duration, colors, gradient, border radiusSkeletonConfig.light()- Light theme presetSkeletonConfig.dark()- Dark theme presetSkeletonConfig.fromBrightness()- Auto-detect themeSkeletonDirection- Animation direction (ltr, rtl, ttb, btt)
-
Theme System:
SkeletonTheme- InheritedWidget for providing consistent skeleton configuration to descendantsSkeletonThemeExtension- Extension for easy access to config viacontext.skeletonConfig
Example App
- Skeleton Helper demo view (
skeleton_view.dart)- Shapes tab: All shape types (rectangle, circle, text, avatar, custom)
- Animations tab: Compare animation styles (shimmer, pulse, wave, none)
- Presets tab: All preset widgets (list item, card, profile, social post, etc.)
- Colors tab: Custom color themes and dark theme preview
- Animation type selector for real-time switching
- Light/Dark theme toggle
- Skeleton demo route added to helpers hub
0.0.9 - 2026-01-08 #
Added #
Force Update Helper Module
ForceUpdateHelper- App version checking and update prompt managementinitialize()- Initialize with config file, API, or custom providercheckForUpdate()- Check for available updatesshowUpdateUI()- Display update prompt with configurable UI styleopenStore()- Redirect to App Store / Play Store
- Multiple version providers:
ConfigFileProvider- Read version info fromapp_config.jsonApiVersionProvider- Fetch version info from API endpointRemoteConfigProvider- Firebase Remote Config integration (adapter-based)
- Multiple UI styles:
UpdateAlertDialog- Dismissible/non-dismissible dialogUpdateBottomSheet- Modal bottom sheet styleForceUpdateScreen- Full screen blocking page for force updates
VersionComparator- Semantic version comparison (supports1.0.0-beta,1.0.0+build)StoreRedirector- Platform-aware store redirects (App Store, Play Store, custom URLs)- Models:
UpdateInfo,ForceUpdateConfig,StoreConfig,UpdateType,UpdateUIType - Customizable strings via
ForceUpdateStringsfor localization
Example App
- Force Update demo view (
force_update_view.dart)- Status display with initialization
- UI type selector (dialog, bottom sheet, full screen)
- Simulation mode for testing different version scenarios
- Preview buttons for optional, recommended, and force updates
- Version comparison examples
- Force Update route added to helpers hub
forceUpdateConfigurationadded toapp_config.json
Fixed #
Example App Navigation
- Fixed back button not working on helper views
- Changed navigation from
context.go()tocontext.push()for helper routes - Back button now properly pops navigation stack on all helper demo views
0.0.8 - 2026-01-08 #
Added #
Push Notification Helper Module
PushNotificationHelper- Unified push notification management with multi-provider supportinitialize()- Initialize with OneSignal, Firebase, or both providersrequestPermission()- Request notification permissionsgetDeviceTokens()- Get device tokens for all active providerssubscribeToTopic()/unsubscribeFromTopic()- Topic managementsetUserId()/removeUserId()- User targetingsendLocalNotification()- Send local notifications
PushNotificationProviderBase- Abstract base for custom providersOneSignalProvider- OneSignal push notification integrationFirebaseProvider- Firebase Cloud Messaging integration- Push notification models:
PushNotificationToken,PushNotificationPermission
Web Viewer Helper Module
WebViewerHelper- HTML and WebView rendering utilitieshtml()- Render sanitized HTML contentstyledHtml()- Render HTML with custom stylingwebView()- Full WebView for URLshtmlWidget()- Flutter widget from HTML
HtmlStyleConfig- Configurable HTML styling optionsHtmlViewerCubitandWebViewerCubitfor state management- HTML rendering widgets with safe content handling
Example App
- Push Notification demo view (
push_notification_view.dart)- Provider status display (OneSignal, Firebase)
- Permission request and status
- Device token display with copy functionality
- Topic subscription management
- User ID targeting
- Web Viewer demo view (
web_viewer_demo_view.dart)- HTML tab: Sanitized HTML rendering
- Styled tab: Custom styled HTML
- Widget tab: HTML as Flutter widgets
- URL tab: Full WebView for URLs
Fixed #
Example App
- Fixed "InkWell requires a Material ancestor" error on iOS
PlatformScaffoldnow wraps body inMaterialwidget on iOS for CupertinoPageScaffold compatibility
Dependencies #
- Added
onesignal_flutter: ^5.3.5for OneSignal push notifications - Added
firebase_core: ^3.12.1andfirebase_messaging: ^15.2.4for Firebase push notifications
0.0.7 - 2026-01-08 #
Added #
SVG Helper Module
SvgHelper- Comprehensive SVG rendering helper class with multiple source supportfromAsset()- Load SVG from asset path with color tinting, sizing, and accessibilityfromNetwork()- Load SVG from URL with caching, placeholder, and error widget supportfromString()- Render SVG from raw string data (useful for API responses)fromFile()- Load SVG from File objecticon()- Convenience method for icon-sized SVGs with standard sizingthemedIcon()- Auto-colored icons using IconTheme from context
SvgConfig- Reusable configuration class for SVG rendering options- Properties:
width,height,color,fit,alignment,semanticsLabel,placeholder,errorWidget - Preset configs:
SvgConfig.smallIcon(24x24),SvgConfig.mediumIcon(32x32),SvgConfig.largeIcon(48x48) copyWith()method for easy customization
- Properties:
Example App
- SVG Helper demo view (
svg_view.dart) with interactive examples:- Asset SVG loading with grid of sample icons
- Color tinting with interactive color picker
- Size variations demo (24px to 96px)
- SVG from String rendering with code preview
- Themed Icon demo showing IconTheme integration
- SvgConfig usage examples with preset configurations
- Sample SVG assets:
home.svg,settings.svg,star.svg,heart.svg,user.svg,search.svg - SVG demo route added to helpers hub
Dependencies #
- Added
flutter_svg: ^2.2.3dependency for SVG rendering support
0.0.6 - 2026-01-07 #
Fixed #
- Fixed async/await issue in
LocalStorageHelper.getByKey()method getByKey()now properly awaits initialization before retrieving values from HiveCE- Fixed HiveCE storage retrieval to properly handle async operations
- Improved error handling in
HiveCeStorageCubit.getByKey()method
Changed #
LocalStorageHelper.getByKey()is now async and properly initializes storage before access- Updated HiveCE example view to show "Key Not Found" message when value is null
- Improved UI feedback in Get by Key section with color-coded success/error states
Example App UI Redesign #
- Redesigned entire example app with minimalist, developer-friendly aesthetic
- Removed all shadows and rounded corners for a flat, clean look
- New monochrome color palette with accent colors for status indicators
- Thin 1px borders instead of shadows for card separation
- Monospace font for code values and keys
- Compact, dense layouts optimized for developer workflows
- Updated views: Home, Products, Profile, Helpers Hub, and all helper demo views
- Consistent design language across all screens
0.0.5 - 2026-01-07 #
Added #
Storage Module
LocalStorageTypeenum - Storage backend selection enum withsharedPreferencesandhiveCeoptionsHiveCeStorageHelper- HiveCE storage implementation with full CRUD operations- Storage type switching support in
LocalStorageHelperviasetStorageType()method - Storage type configuration in
app_config.jsonviastorageConfiguration.localStorageTypefield - MasterApp automatically reads and sets storage type from configuration
- Storage type displayed in CONFIGURATION LOADED debug output
Example App
- HiveCE Storage demo view (
hive_ce_storage_view.dart) - HiveCE Storage cubit and state (
hive_ce_storage_cubit.dart,hive_ce_storage_state.dart) - "All Items in Database" section showing all stored items with keys, types, and values
- Refresh functionality to reload all items from database
- HiveCE demo route added to helpers hub
Changed #
LocalStorageHelpernow supports multiple storage backends (SharedPreferences and HiveCE)- Storage backend is selected based on
storageConfiguration.localStorageTypein app config - Default storage type is
sharedPreferencesfor backward compatibility - CONFIGURATION LOADED output now includes storage type information
Dependencies #
- Added
hive_ce: ^2.16.0dependency for HiveCE storage support
0.0.4 - 2025-12-24 #
Changed #
Example App
- Refactored all helper demonstration views to follow consistent feature pattern
- Reorganized helper views into structured folders with cubit/state architecture:
device_info/- Device Info Helper demo with cubit/statestorage/- Local Storage Helper demo with cubit/statedatetime/- DateTime Helper demo with cubit/stateurl_launcher/- URL Launcher Helper demo with cubit/statepermissions/- Permissions Helper demo with cubit/state (renamed toHelperPermissionsCubit/Stateto avoid conflicts)share/- Share Helper demo with cubit/statedownload/- File Download Helper demo with cubit/stateconfig/- App Config Helper demo with cubit/statepackage_info/- Package Info Helper demo with cubit/state
- All helper views now use
MasterViewCubitpattern matchingHomeViewstructure - Updated routes configuration to use new helper view structure
- Updated GetIt dependency injection to register all helper cubits
- Improved code organization and maintainability
Fixed #
- Resolved naming conflicts with
PermissionsStateandPermissionsCubitfrom masterfabric_core - Fixed linting errors in helper views
Changed #
- Version bump to 0.0.4
0.0.3 - 2025-12-23 #
Added #
Example App
- Complete example application demonstrating
masterfabric_coreusage - Example app structure with features (home, products, profile)
- Example screens demonstrating
MasterViewCubitpattern:HomeView- Home screen with device info and storage examplesProductsView- Products list with loading, error, and success statesProfileView- Profile screen with user information
- Example cubits and states showing state management patterns
- Example routes configuration with GoRouter
- Example
main.dartshowingMasterAppinitialization - Example
README.mdwith usage patterns and documentation - Example app configuration (
app_config.json) - GetIt dependency injection setup examples
- AppBar customization examples with back button and actions
Changed #
- Version bump to 0.0.3
0.0.1 - 2025-12-23 #
Added #
Base Module
BaseViewBloc- Abstract BLoC-based view classBaseViewCubit- Abstract Cubit-based view classBaseViewHydratedCubit- Persisted Cubit view class with state persistenceBaseViewModel- Base view model classBaseViewModelCubit- Cubit-based view modelBaseViewModelHydratedCubit- Hydrated view model with persistenceBaseViewState- Base state management class with common states (sealed class)MasterView- Unified view management interface with enums and mixinsMasterApp- Main application wrapper with initialization and configurationMasterViewCubit- Cubit-based master view with enums and mixinsMasterViewHydratedCubit- Hydrated master view with persistence, enums, mixins, and initializationMasterScaffoldWidget- Common scaffold widget with osmea_components integrationHydratedBlocInit- Hydrated bloc storage initialization helper
Helper Module
LocalStorageHelper- SharedPreferences wrapper for local storage (static API)AuthStorageHelper- Authentication data persistence helperSpacerHelper- UI spacing utilities with CoreSpacerType enumUrlLauncherHelper- External URL and app launchingWebViewerHelper- HTML/WebView rendering utilitiesApplicationShareHelper- Content sharing functionalityDateTimeHelper- Date and time operations and formattingDoubleExtensionHelper- Number formatting extensionsPriceInfoCurrencyHelper- Currency formatting utilitiesFirstLetterCapitalizeHelper- String capitalization helpersGridHelper- Grid layout calculation utilitiesDeviceInfoHelper- Device information retrieval (singleton pattern)PermissionHandlerHelper- Runtime permissions management with abstract base and modelsLocalNotificationHelper- Local push notificationsFileDownloadHelper- File downloads with progress trackingAssetConfigHelper- JSON config management from assets with fallback support (camelCase keys)PackageInfoHelper- Package information retrieval (app name, version, build number)OnboardingStorageHelper- Onboarding flow storage (uses LocalStorageHelper)CommonLoggerHelper- Logging utilities
Views Module
SplashView- App launch screen with loading logic and multiple style supportSplashStartupWidget- Basic splash style with logo and loading indicatorSplashSpaceWidget- Ultra-minimalist text-based splash styleSplashEnterpriseWidget- Professional corporate card-based splash style
OnboardingView- User onboarding flow with cubit and state managementAuthView- Authentication screen with Sign In/Sign Up tabs and cubit/stateAccountView- User account management screen with cubit and statePermissionsView- Permission request screens with cubit and stateErrorHandlingView- Error display and recovery with cubit and stateLoadingView- Loading state views with cubit and stateEmptyView- Empty state views with cubit and stateInfoBottomSheetView- Information bottom sheets with cubit and stateImageDetailView- Image detail viewer with cubit and stateSearchView- Search functionality interface with cubit and stateAppRoutes- Route definitions with GoRouter integration
Models Module
LoadingModel- Loading state configurationsLoadingConfig- Loading configuration with type, message, dismissible, and timeoutLoadingTypeenum - Loading indicator types (circular, linear, custom)ErrorModel- Error handling data modelsOnboardingPageModel- Individual onboarding page configurationOnboardingConfig- Onboarding flow configuration with pages and button textSplashConfigModel- Splash screen configurations with style supportSplashStyleenum - Splash style options (startup, space, enterprise)SplashFlowStateenum - Splash flow statesSplashActionenum - Splash actionsEmptyViewModel- Empty state configurationsInfoModel- Info sheet configurations
Layout Module
Grid- Grid layout system with responsive calculations and dev mode overlay (DevGridOverlay)Spacer- Spacing utilities for consistent UI (CoreSpacer,NavbarArea,FooterArea)CoreSpacerTypeenum - Spacer types (navbar, footer, content, section, horizontal, vertical)
Dependency Injection
- Injectable configuration setup with code generation
- GetIt integration structure
- Injection configuration files (
injection.dart,injection.config.dart)
Localization
- Slang configuration for i18n (
slang.yaml) - English translation file (
assets/i18n/en.i18n.json) - Generated resources (
resources.g.dart,resources_en.g.dart) - Translation keys organized by view (common, auth, account, onboarding, permissions, search, error, splash, etc.)
Configuration
pubspec.yamlwith all required dependenciesslang.yamlfor localization configurationapp_config.jsonfor app configuration with fallback support (camelCase format)appSettings- App name, version, environment, debug mode, maintenance modeuiConfiguration- Theme mode, font scale, dev mode settingssplashConfiguration- Splash screen style, duration, colors, logo settingsfeatureFlags- Feature toggles (onboarding, analytics, etc.)navigationConfiguration- Default routes, deep linkingapiConfiguration- API base URL, timeout, retry settingspermissionsConfiguration- Required and optional permissionslocalizationConfiguration- Default locale, supported localesstorageConfiguration- Encryption, cache settings
Dependencies #
- State Management:
flutter_bloc(^9.1.0),hydrated_bloc(^10.1.1),equatable(^2.0.7) - Navigation:
go_router(^15.1.1) - Dependency Injection:
injectable(^2.7.1),get_it(^8.3.0) - Localization:
slang(^4.11.1),slang_flutter(^4.11.0) - Utilities:
logger(^2.5.0),dio(^5.7.0),shared_preferences(^2.5.3),sqflite(^2.4.2),url_launcher(^6.3.1),intl(^0.20.0) - System:
device_info_plus(^11.4.0),package_info_plus(^8.3.0),permission_handler(^11.2.0),path_provider(^2.1.5) - UI:
flutter_html(^3.0.0),flutter_inappwebview(^6.1.5),webview_flutter(^4.10.0) - Notifications:
flutter_local_notifications(^19.4.2),timezone(^0.10.1) - Sharing:
share_plus(^10.1.4)
Dev Dependencies #
flutter_test- Flutter testing frameworkflutter_lints(^5.0.0) - Linting rulesbuild_runner(^2.4.7) - Code generationinjectable_generator(^2.11.1) - Injectable code generationslang_build_runner(^4.8.0) - Slang code generation
Documentation #
- Comprehensive README.md with usage examples
- Package structure documentation
- Architecture overview
- Quick start guide
0.0.2 - 2025-12-23 #
Changed #
- Migrated from
osmea_componentsto Material Design widgets - All UI components now use Flutter's built-in Material widgets
- Updated
MasterScaffoldWidgetto use Material Design instead of osmea_components - Updated splash widgets (
SplashStartupWidget,SplashSpaceWidget,SplashEnterpriseWidget) to use Material widgets - Replaced
OsmeaColorswith MaterialColors - Replaced
OsmeaComponents.*helpers with standard Material widgets (Container,Column,Row,Text, etc.) - Updated
SpacerHelperto use Material colors instead of osmea colors - Removed
osmea_componentsdependency frompubspec.yaml
Removed #
osmea_componentsGit dependency (replaced with Material widgets)- All
OsmeaComponents.*helper methods - All
OsmeaColors.*color references osmea_componentsexport from main library
Documentation #
- Updated README.md with pub.dev installation instructions
- Added package publishing information
- Updated repository URLs to
https://github.com/gurkanfikretgunak/masterfabric_core
Publishing #
- Package published to pub.dev
- Package ready for public use via
flutter pub add masterfabric_core - Version bumped to 0.0.2