OnLeaveScope class
Annotation used to mark a method that should be called when leaving a scope.
The method should be inside a class annotated with WeaverScope or WeaverSwitchScope.
Single scope: If you omit OnLeaveScope, the generated handler unregisters
dependencies you registered in OnEnterScope. If you add OnLeaveScope, you must
unregister (or dispose) those yourself; NamedDependency fields are still cleaned up
unless NamedDependency.autoDispose is false.
Switch scope: Same idea per child; omit OnLeaveScope for automatic cleanup when switching away from that child.
Constructors
- OnLeaveScope({String? name})
-
Creates an OnLeaveScope annotation.
const
Properties
Methods
-
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