y_infra 0.0.8
y_infra: ^0.0.8 copied to clipboard
A reusable Flutter infrastructure package — cache, storage, auth, network, database, permissions, formatters, and more.
0.0.8 #
- Added
ErrorBody— the parsed error envelope (code,message,traceId,details,raw) of a failed response, reachable asAppError.body; apps that map backend error codes to behaviour no longer have to re-parseDioException.response.datathemselves - Added
AppError.statusCode— the raw HTTP status, for endpoints that give one their own meaning (a 409 that means "not ready yet", a 413 that means "file too large"); the status was previously only reflected in the error type - Behaviour change: a plain-text response body is no longer shown to the user as-is. A gateway or CDN in front of the API (Cloudflare block page, 502 page, captive portal) answers with HTML, and that used to end up in
AppError.message. Such bodies are now discarded in favour of the matchingErrorMessagestext, and are still available in full viaAppError.body.raw - Behaviour change: an empty
messagein the envelope now falls back to the matchingErrorMessagestext instead of leaving the error with an empty message
0.0.7 #
- Added
PaginatedResponseKeys—PaginatedResponse.fromJsonkey names are now overridable, globally viaPaginatedResponse.configureor per-call via thekeysparameter PaginatedResponse.fromJsonnow accepts stringified numbers for page/count fields- BREAKING:
DateTimeFormatter.formatSecondsno longer takes aminShortparameter — append your own unit suffix if needed - Improved
MapLauncher.open— routes to Apple Maps on iOS and Google Maps on other platforms instead of falling back across both
0.0.6 #
- Added
LocaleCubit— manages current locale with supported-language checks andeasy_localizationsync - Improved
PriceFormatter.configure— now acceptssymbol,symbolAfter, anddecimalDigitsas global defaults, overridable per-call
0.0.5 #
- BREAKING:
CrudCubit<T>→CrudCubit<T, Id>— generic ID type instead of hardcodedint - BREAKING:
PaginatedCubit<T>→PaginatedCubit<T, Id>— generic ID type instead of hardcodedint - BREAKING:
BaseOperationCubit<TResult>→BaseOperationCubit<TResult, Id>— generic ID type fortargetId - BREAKING:
EndpointResponseLogDataandNetworkResponseLogDatanow take plain fields (statusCode,body,url) instead ofhttpResponse - BREAKING:
CrudSavedandCrudDeletednow carry anitemsfield;CrudCubitemits a single state instead of two - Fixed
AuthInterceptorandIRemoteDatasourcedepending on concreteAuthTokenStorageinstead ofIAuthTokenStorage - Fixed
ExternalStoragePermissionHandler.g2gchecking wrong permission (Permission.storagevsPermission.manageExternalStorage) - Fixed
AppNavObserver.didPop/didRemoveremoving wrong routes from the navigation stack - Fixed
EventLogData.messagethrowingUnimplementedError— now accepts a message string - Fixed
TokenPairnot extendingEquatable, causing missed state changes inAuthState - Added
ErrorMessages— centralised, overridable error messages for i18n support - Updated all error types and
ErrorMapperto useErrorMessages.instanceinstead of hardcoded English - Removed
LocationServiceauto-init in constructor — consumers now callinit()explicitly - Removed
httppackage dependency (no longer needed)
0.0.4 #
- Added
InterceptorPipelinefor composable Dio interceptor chains - Added
AuthCubitwith token check, login/logout, and auto-logout on auth failures - Added
AuthStatehierarchy (AuthInitial,AuthLoading,Authenticated,Unauthenticated) - Added
UnauthenticatedReasonenum (noToken,sessionExpired,loggedOut) - Added
FilterableMixin— generic filtering mixin for any Cubit (search, sort, filter) - Improved
BaseOperationCubit— now generic with built-inexecute()and duplicate call guard - Removed
SafeOperationMixin(merged intoBaseOperationCubit) - Removed
FilterablePaginatedCubit(usePaginatedCubit with FilterableMixininstead) - Removed
CorrelationIdInterceptor - Restructured
data/network/intoconfig/,datasource/,interceptors/,objects/ - Restructured
utils/formatters/intoinput/anddisplay/subfolders - Moved
token_pair.darttoauth/objects/ - Moved
components/to top-levellib/components/ - Moved
mixins/to top-levellib/mixins/ - Moved
map_launchertoutils/map/with configurable URLs and error message - Added doc comments to all files
- Updated README with full usage examples
0.0.3 #
- Added TTL (time-to-live) support to cache system
- Added ConnectivityService for network status monitoring (connectivity_plus)
0.0.2 #
- Added SeparatorInputFormatter as configurable base for input formatters
- Added CreditCardNumberInputFormatter and CardExpiryInputFormatter
- Added IAuthTokenStorage interface
- Added YInfraColors ThemeExtension
- Restructured package into core/, data/, domain/, platform/, base_features/, utils/
- Updated all dependencies to latest versions
0.0.1 #
- Initial release
- Core: cache, errors, log, notifier, storage, theme
- Data: database (SQLite), file (CSV/JSON), network (Dio interceptors, config)
- Domain: repository with queue/dedup and cache invalidation
- Auth: token pair storage
- Firebase: analytics, messaging, realtime database abstractions
- Push: notification management with Awesome Notifications
- Platform: permission handlers, location service
- Base Features: CRUD, list, paginated, operation cubits + filterable mixin
- Utils: formatters, generators (UUID), validators, routing
- Base Features: SnackBarY mixin, MapLauncher, bottom sheet selector