TickkiTrackable class
One-line wrapper that emits a named tap event when the child is
tapped. Use this on buttons / clickable rows you care about
analytically — leave the rest to ambient capture from
TickkiAnalyticsScope.
TickkiTrackable(
name: 'add_to_cart_btn',
label: 'Add to cart',
child: ElevatedButton(onPressed: addToCart, child: const Text('Add to cart')),
)
Requires a TickkiAnalyticsScope ancestor. If analytics is passed explicitly, the scope isn't required.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TickkiTrackable
Constructors
-
TickkiTrackable({Key? key, required Widget child, String? name, String? label, String elementType = 'button', Map<
String, dynamic> ? properties, TickkiAnalytics? analytics}) -
const
Properties
- analytics → TickkiAnalytics?
-
Override the analytics instance. When null, the widget reads
from the nearest
TickkiAnalyticsScope. Pass this only for tests or when the scope isn't installed.final - child → Widget
-
The widget you want to instrument. Typically a button or
list-tile-style row.
final
- elementType → String
-
Loose category for grouping. Default
'button'; use'link','icon','row', etc. as fits your UI vocabulary.final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
Human-readable label, e.g. the button's visible text. Surfaces
in the agent UI and in analytics as
element_label.final - name → String?
-
Stable identifier for the element — kept across re-renders.
Surfaces in analytics queries as
element_key.final -
properties
→ Map<
String, dynamic> ? -
Optional bag of additional fields persisted into the event's
metacolumn. Use for product ids, list positions, etc.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited