pingora library
Pinger's ViewModel / Controller pattern.
Pingora is the base class for creating state controllers with automatic listener management. Use PingoraScope to scope a controller's lifecycle to a widget subtree and PingoraSelector for fine-grained rebuild control.
Classes
- Pingora
- The base class for creating ViewModels / Controllers that can notify listeners about state changes.
-
PingoraScope<
T extends Pingora> - Widget responsible for automatically creating and disposing a Pingora controller together with the widget lifecycle. This allows developers to scope controllers to a screen, component, or any subtree without manual memory management.
-
PingoraSelector<
T extends Pingora, S> - The PingoraSelector widget is a highly optimized reactive builder that listens to a specific Pingora controller and rebuilds only when a selected portion of the state changes. This helps avoid unnecessary UI rebuilds and improves performance by isolating updates to only required state slices instead of rebuilding the entire widget tree.
Extensions
- PingoraExtension on BuildContext
- Extension on BuildContext providing convenient access to Pingora controllers that are scoped via PingoraScope ancestors in the widget tree.