CallbackInvoker class
Utility class for safely invoking callbacks with error handling.
Prevents callback exceptions from crashing the interaction system. All callback errors are caught and logged (in debug mode) or silently ignored (in release mode) to ensure robust interaction handling.
Thread-safe: Can be used from any isolate/thread.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
invoke<
T> (T? callback, List getArgs()) → void - Invokes a nullable callback with error handling.
-
invokeAsync<
T> (T? callback, List getArgs()) → Future< void> - Invokes an async callback safely.
-
invokeCrosshair(
CrosshairChangeCallback? callback, Offset? position, List< ChartDataPoint> snapPoints) → void - Invokes a crosshair changed callback.
-
invokeDataPoint(
DataPointCallback? callback, ChartDataPoint point, Offset position) → void - Invokes a data point callback (tap, hover, long-press).
-
invokeDataPointHover(
DataPointHoverCallback? callback, ChartDataPoint? point, Offset position) → void - Invokes a data point hover callback.
-
invokeDataPointLongPress(
DataPointLongPressCallback? callback, ChartDataPoint point, Offset position) → void - Invokes a data point long-press callback.
-
invokeKeyboard(
KeyboardActionCallback? callback, String action, ChartDataPoint? targetPoint) → void - Invokes a keyboard action callback.
-
invokePan(
PanCallback? callback, Offset panOffset) → void - Invokes a pan changed callback.
-
invokeSelection(
SelectionCallback? callback, List< ChartDataPoint> selectedPoints) → void - Invokes a selection changed callback.
-
invokeSelectionResult(
SelectionResultCallback? callback, ChartSelectionResult result) → void - Invokes a rich selection-result callback.
-
invokeTooltip(
TooltipChangeCallback? callback, bool visible, ChartDataPoint? dataPoint) → void - Invokes a tooltip changed callback.
-
invokeViewport(
ViewportCallback? callback, Map< String, double> visibleBounds) → void - Invokes a viewport changed callback.
-
invokeZoom(
ZoomCallback? callback, double zoomLevelX, double zoomLevelY) → void - Invokes a zoom changed callback.