WidgetCache<T extends GetWidgetCache> class abstract

Abstract cache class for managing widget state and lifecycle.

This class provides a caching mechanism for GetWidgetCache widgets. It offers lifecycle callbacks (onInit, onClose) and a build method for efficient widget rebuilding. The generic type T ensures type-safe access to the associated widget.

Subclasses should override build to provide the widget content and optionally override onInit and onClose for lifecycle logic.

Constructors

WidgetCache()

Properties

context BuildContext?
The build context for this cache.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget → T?
The associated widget instance.
no setter

Methods

build(BuildContext context) Widget
Builds the widget content for this cache.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClose() → void
Called when the cache is disposed (widget is unmounted).
onInit() → void
Called when the cache is initialized (widget is mounted).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited