Advanced topic
Extension points, and the parts the package is built from.
Nothing here is needed to use hint_kit. It is exported because the pieces are
useful on their own and because a package that hides its internals forces you
to fork it: resolvePlacement is the side-picking algorithm, buildBubblePath
the fused bubble-and-caret path, HintRectTracker the target tracking, and
AnchoredHintBubble the measure-resolve-place-animate engine that Hint and
HintTarget both run on.
HintObserver is the exception worth knowing about early: it reports every
hint and tour lifecycle event in one place, which is where analytics goes.
Classes
- AnchoredHintBubble Advanced
- Positions, animates and paints a hint bubble against a target rect.
- HintBubbleContent Advanced
- The default contents of a hint bubble: an optional title above a message.
- HintBubbleDecoration Advanced
- Paints a hint bubble: fill, optional border and optional drop shadow, all from the single path built by buildBubblePath.
- HintEvent Advanced
- What happened to one hint.
- HintObserver Advanced
- Watches every hint and tour in the app.
- HintPlacement Advanced
- The result of resolvePlacement.
- HintRectTracker Advanced
- Measures a target widget's rect in overlay coordinates and notifies when it changes.
- MeasureSize Advanced
- Reports the laid-out size of child to onChange.
- RenderSpotlightBlocker Advanced
- The render object behind a Spotlight's pointer behaviour.
- Spotlight Advanced
- A full-screen scrim with a hole cut out of it, sized to a target.
Functions
-
buildBubblePath(
{required Rect rect, required BorderRadius borderRadius, required HintSide side, required double arrowFraction, required Size arrowSize, HintArrowShape arrowShape = HintArrowShape.triangle, HintArrowBuilder? arrowBuilder}) → Path Advanced - Builds the outline of a hint bubble: the rounded body with its arrow fused into a single closed path.
-
resolvePlacement(
{required Rect target, required Size overlay, required Size bubble, required HintDirection preferred, required double gap, required EdgeInsets margin, required double arrowInset, required TextDirection textDirection}) → HintPlacement Advanced -
Decides where a hint bubble of size
bubbleshould go relative totarget.
Enums
- HintSide Advanced
- The side a hint bubble was actually placed on, after resolution.
- RectTrackingMode Advanced
- How often a HintRectTracker re-measures its target.
Typedefs
- SizeChangedCallback = void Function(Size size) Advanced
- Signature for MeasureSize.onChange.