opticore 2.3.0
opticore: ^2.3.0 copied to clipboard
OptiCore is a lightweight micro-framework for Flutter that simplifies and optimizes your app development
๐ Changelog #
All notable changes to this project are documented here. Each release includes details about new features, improvements, bug fixes, and any breaking changes, helping users and developers track the evolution of OptiCore.
๐ Versioning Strategy #
We follow Semantic Versioning (SemVer) to indicate the nature of changes:
- ๐ MAJOR: Breaking changes that may affect compatibility.
- ๐ MINOR: New features or improvements that are backward compatible.
- ๐ PATCH: Bug fixes and minor improvements that are backward compatible.
Each section lists the changes in chronological order, with the most recent release at the top. Where applicable, links to relevant discussions or issues are provided.
๐ฏ [2.3.0] - Stability & Network Enhancements #
-
๐ New Features:
- Added
ReactiveSelector<T, S>widget for type-safe property selection (replacesReactive.selectwith proper generics) - Added
ReactiveBuilder<T>widget for lightweightValueListenablerebuilds withbuildWhensupport - Added
BlocPartBuilderfor building specific parts of BLoC state - Added
CancelTokensupport inNetworkHelper.request()for request cancellation - Added
addInterceptor()/removeInterceptor()toNetworkHelperfor custom Dio interceptors - Added per-request
connectTimeoutandreceiveTimeoutinNetworkHelper.request() - Added
timeoutparameter toSafeCall.execute() - Added
NoInternetExceptiontype for type-safe no-internet detection - Added SSL certificate pinning support via
NetworkHelper.loadPinningCertificate() - Added
builderparameter toAppConfigfor custom root-level widget wrappers - Added
ToastConfigfor global toast color customization - Added full WASM/web platform support via conditional imports and platform stubs
- Added
-
๐ Bug Fixes:
- Fixed
NetworkHelpercreating new Dio instance per repository (now singleton) - Fixed memory leak in
TextInputHelperโ listener removal callback now returned - Fixed magic string
"487"for no-internet detection โ replaced withNoInternetExceptiontype check - Fixed force-unwrap crash in
MaintenanceScreen.refreshCallBack - Fixed
ConnectionHelpersubscription never cancelled and stale cache - Fixed
BaseScreen.showLoading()using 300s uncancellable timeout (now 30s cancellable Timer) - Fixed
BaseScreen.closeKeyboard()andCoreSetupforce-unwrap onprimaryFocus - Fixed
BaseScreen._handleNullBuilder()returningdynamicinstead ofWidget - Fixed
NoInternetScreensetting static flag insidebuild()(moved toinitState()) - Fixed
LazyIndexedStackforce-unwraps on nullable controllers andpageBuilder - Fixed
ApiResponseonly extractingdata["message"]โ now trieserror,detail,error_message - Fixed
ApiResponsetreating 403 as generic error โ now handled asunauthorizedErrorlike 401 - Fixed unsafe
_previousValue as Tcast inReactivewidget - Fixed
AsyncReactiveNotifier.execute()race condition with concurrent calls (operation ID guard) - Fixed
ContentBuildernot caching BLoC whendisposeBloc: false - Fixed
StateBuilderbuildWhennot working (rewritten withBlocBuilder) - Fixed
EventTransformersdebounce missingisClosedguard - Fixed
DioConnectivityRequestmissing retry guard and completion checks - Fixed
ExpandableTexthardcoded LTR direction - Fixed
HideOnScrollaccessingscrollController.positionwithouthasClientsguard
- Fixed
๐ [2.2.1] - CoreSetup Builder & Toast Customization #
- ๐ New Features:
- Added
builderparameter (TransitionBuilder?) toAppConfigfor injecting custom root-level widget wrappers (e.g., providers, overlays) on top of the internal BotToast and MediaQuery setup inCoreSetup - Added
ToastConfigfor global toast color customization โ overridesuccessColor,errorColor,infoColor,warningColor,iconColor, andtextColorat runtime viaToastConfig.instantiate() ToastHelpernow reads all colors fromToastConfig, falling back to the originalCoreColorsdefaults when not configured
- Added
๐ฏ [2.2.0] - Reactive State Management #
- ๐ New Features:
- Added
ReactiveNotifier<T>- A lightweight reactive value holder similar toValueNotifierwith extra convenience methods (update,silent,refresh) - Added
AsyncReactiveNotifier<T>- For async operations with built-in loading/error/data states - Added
Reactive<T>widget - A single unified widget for reactive UI rebuilds with optional features:buildWhen- Control when to rebuildlistener- Side effects without rebuildingautoDispose- Automatically dispose notifier when widget is removedReactive.multi- Listen to multiple notifiersReactive.select- Rebuild only when selected property changesReactive.async- Handle async states with loading/error/data builders
- Added
ReactiveProvider<T>- Share notifiers across the widget tree using InheritedWidget - Added
context.reactive<T>()extension for easy notifier access
- Added
๐ฏ [2.1.8] - BLoC Lifecycle Control #
- ๐ New Features:
- Added
disposeBlocparameter toBaseScreenfor controlling BLoC disposal behavior - Added
customAppBarWidgetparameter toMaintenanceConfigfor custom app bar support MaintenanceScreennow conditionally allows back navigation when custom app bar is configured
- Added
๐ [2.1.7] - Status Bar Navigation Fix #
-
๐ Bug Fixes:
- Fixed status bar icon color not updating when navigating back to previous screen
- Implemented
RouteAwaremixin inBaseScreento properly track navigation lifecycle - Added global
RouteObservertoRouteHelperfor navigation event monitoring - Status bar icons now correctly switch between dark/light when popping back from another screen
- Added
sized: truetoAnnotatedRegionfor better status bar overlay coverage
-
โก Performance Improvements:
- Optimized
_refreshStatusBar()calls to only fire on actual navigation events (push/pop) - Removed redundant status bar updates from
initState,didChangeDependencies, anddidUpdateWidget - Reduced unnecessary rebuilds and system UI overlay updates
- Optimized
-
๐ Infrastructure:
- Enhanced
CoreSetupto includeRouteObserverin navigator observers - Improved navigation lifecycle handling across all screens using
BaseScreen
- Enhanced
๐ [2.1.6] - Event Transformers & UI Enhancements #
-
๐ฏ New Features:
- Added Event Transformers for BLoC pattern with debounce and sequential processing
- Introduced
debounce()transformer with customizable duration for delayed event processing - Added predefined transformers:
fastDebounce(),standardDebounce(),slowDebounce(),verySlowDebounce() - Implemented
sequential()transformer for one-by-one event processing
-
๐จ UI Improvements:
- Enhanced
CoreButtonwith additional tap gesture support - Added
barrierColorproperty toCoreSheetfor better customization
- Enhanced
-
๐ Bug Fixes:
- Fixed status bar icon color issues across different themes
- Resolved type compatibility issues in theme extensions (
AppBarThemeData,InputDecorationThemeData)
๐ [2.1.5] - Scroll Overlay & Usability Improvements #
-
๐งฉ New Widget:
ScrollStatusBarOverlay: Wraps a scrollable and paints an overlay behind the status bar to improve visual experience in scrollable UIs.
-
๐จ UI Enhancements:
- Added
PlaceholderAlignmentsupport towithUnderlineinsideWidgetSpanfor more control over inline widget alignment. - Introduced zero
itemPaddingdefault toFlexibleGridViewfor tighter and more compact grid spacing.
- Added
-
๐ Extensions:
- Enhanced
safeIntextension for better default handling and fallback precision.
- Enhanced
-
๐ฆ Dependency Updates:
- Updated internal dependencies for performance, compatibility, and future-proofing.
โจ [2.1.4] - UI & String Extension Enhancements #
-
๐ ExpandableText:
- Added
underlinesupport for enhanced text styling.
- Added
-
๐ String Extension:
- Introduced
.arabicNumbersgetter to convert English digits into Arabic numerals.
- Introduced
๐ง [2.1.3] - Validation Toolkit & Dependency Updates #
-
๐ฆ Dependency Updates:
- Upgraded internal packages to ensure stability and compatibility
-
โ Validation Improvements:
- Integrated
auto_validatepackage - Centralized and enhanced validation capabilities across the micro-framework
- Integrated
๐ [2.1.2] - API Enhancements #
- ๐งฐ Improved Map Extensions:
- Made
keyparameter optional insafeList<T>()for more flexible API usage - Enhanced return behavior to provide empty list when key is not provided
- Made
๐ [2.1.1] - Static Analysis Improvements #
- ๐ Enhanced pub score with improved static analysis compliance
- ๐ Documentation refinements for better DartDoc generation
- ๐ Type safety enhancements across all components
- ๐งน Code cleanup with removal of unused imports and dependencies
๐ [2.1.0] - Core Improvements & New Components #
๐ New Features
- ๐งฉ Added
StateBuilderwidget for selective UI updates based on specific component states - ๐๏ธ Added
ComponentDataStateinRenderStatefor better state management - ๐งฐ New Extensions:
DoubleFormatterfor smart number formatting (formatSmart)IterableExtensionwithfirstWhereOrNullmethod for safer collection operations
- ๐๏ธ Enhanced CoreButton with new properties (
dimmedBackgroundColor,dimmedTextColor)
๐ Improvements
- ๐ผ๏ธ SvgWidget Enhancements:
- Auto-detection of SVG type
- More flexible property requirements (path, bytes, or file)
- ๐ API & Network improvements:
- Better error handling
- Fixed issues with status code parsing
- Improved connection timeout handling with proper loading states
- Fixed
updateHeadersissues inBaseRepo
- ๐ฑ UI Components:
- Enhanced click behavior in
ExpandableText - Added
enableScrollproperty toCoreSheet - Set
itemPaddingdefault to zero inFlexibleListView
- Enhanced click behavior in
- ๐ Code Quality:
- Improved
BaseBlocimplementation - Updated dependencies to latest versions
- Improved
๐ Breaking Changes
- ๐ Renamed
buildertoitemBuilderinFlexibleGridViewfor API consistency
๐ [2.0.1] - Documentation Update #
- ๐ Enhanced README.md: Improved clarity, structure, and formatting for better readability.
๐น [2.0.0] - Initial Stable Release #
- ๐ First official stable release of OptiCore.
For a complete history of updates during the beta phase, refer to Beta History.
Stay updated with the latest enhancements and fixes! ๐