RawLifecycle class
A basic implementation of the Lifecycle interface.
This class allows defining lifecycle behavior through callbacks for initialization and disposal. It provides a simple way to manage lifecycle events by passing functions to onInit and onDispose.
- Implemented types
Constructors
-
RawLifecycle.new({required Future<
void> onInit(), required Future<void> onDispose()}) - Constructs a RawLifecycle with the required lifecycle callbacks.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onDispose
→ Future<
void> Function() -
A function that is called when the lifecycle is disposed.
final
-
onInit
→ Future<
void> Function() -
A function that is called when the lifecycle is initialized.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> -
Calls the onDispose function to clean up resources.
override
-
init(
) → Future< void> -
Calls the onInit function to initialize the lifecycle.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited