pervice 1.3.3
pervice: ^1.3.3 copied to clipboard
A Flutter-native MVVM service layer that creates, loads, watches, shares, and disposes services according to the widget lifecycle.
1.0.0 #
- Initial release of Pervice.
- Successor to
mvvm_service. - Redesigned around Flutter widget lifecycle and providerless services.
1.1.0 #
- Added
Service.request()for one-time data requests that require a result. - Added
Service.requestOrNull()for one-time data requests with an optional result.
1.2.0 #
- Breaking: Changed
Service.canRethrowtotrueby default, so loading errors are rethrown unless explicitly disabled. - Breaking: Renamed
Service.notifyUpdated()toService.notifyChanged(). - Breaking: Removed
Service.canDebugPrintand automatic error logging. - Made
vsyncoptional inuseTabController()anduseAnimationController(), usinguseTickerProvider()when omitted.
1.2.0+1 #
- Breaking: Renamed
Service.isErrortoService.hasError. - Updated the README and example to use the current service API.
- Corrected the README's error handling documentation to reflect rethrowing errors by default and the removal of automatic error logging.
- Changed
Service.requestOrNull()to returnnullinstead of rethrowing loading errors. - Updated
useTickerProvider()to reuse a single ticker provider within the same widget, including animation hooks that omitvsync.
1.3.0 #
- Added
BuildContext.setState()to request a rebuild of the current widget or the nearest ancestor of a specified widget type, with an optional callback. - Added
BuildContext.onInitState()andBuildContext.onDispose()for one-time initialization and cleanup callbacks tied to the calling widget lifecycle.
1.3.1 #
- Restored
Service.canRethrowtofalseby default.
1.3.2 #
- Changed
Service.request()to callfetchData()directly instead ofload()and propagate errors regardless ofcanRethrow. - Added an assertion that
Service.request()starts withServiceStatus.nonefor one-time use. - Changed
Service.requestOrNull()to delegate torequest()and returnnullon failure instead of returning existing data.
1.3.3 #
- Fixed
Service.datato supportvoidand nullable data types without throwing on successful loads or requests.