RefenaDebugObserver class
A plug-and-play RefenaObserver that prints every action into the console for easier debugging.
- Inheritance
-
- Object
- RefenaObserver
- RefenaDebugObserver
Constructors
- RefenaDebugObserver({void onLine(String s)?, void onErrorLine(String s, Object e, StackTrace st)?, bool exclude(RefenaEvent event)?})
Properties
- debugLabel → String
-
Override this getter to provide a custom label.
no setterinherited
- exclude → (bool Function(RefenaEvent event)?)
-
If the given function returns
true
, then the event won't be logged.final - hashCode → int
-
The hash code for this object.
no setterinherited
- initialized → bool
-
Whether the observer has been initialized.
The observer won't receive any events until it is initialized.
no setterinherited
- onErrorLine → (void Function(String s, Object e, StackTrace st)?)
-
Similar to onLine but only called when an error occurs.
Fallbacks to onLine if not specified.
final
- onLine → (void Function(String s)?)
-
You can integrate this observer into the logging library
used by your project.
final
- ref → Ref
-
Use the ref to access the state.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Override this method to have additional dispose logic.
Observers only get disposed when the RefenaContainer is disposed.
inherited
-
handleEvent(
RefenaEvent event) → void -
Called when an event occurs.
Override this method to handle the event.
override
-
init(
) → void -
Override this method to have additional initialization logic.
You can use ref at this point.
inherited
-
internalSetup(
ProxyRef ref) → void -
inherited
-
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