Tooltip
PaymentTooltip adds a one-line, non-interactive hint to a control or a short value: the full date behind “2 days ago”, the name of an icon button. It opens on tap as well as on long press, hover and keyboard focus. It is the theme’s ink color with the surface color for text, the strongest contrast the theme has.





PaymentTooltip( placement: PaymentTooltipPlacement.top, message: 'Paid on 29 Oct 2026, 14:05', child: Text('2d ago'), );An interactive trigger, such as an info button, uses trigger. The button’s own press toggles the hint, because the button wins the tap:
PaymentTooltip( message: s.feesTooltip, trigger: (toggle, focusNode) => PaymentIconButton( icon: Icons.info_outline, tooltip: s.feesInfo, focusNode: focusNode, onPressed: toggle, ),);Variants
Section titled “Variants”Variants: label, description; twelve placements.
Tap, one line, and trigger
Section titled “Tap, one line, and trigger”- A tap on a non-interactive
child(text, an icon, a disabled control) toggles the hint. A second tap, a tap outside and Escape close it. - A child with its own tap action wins the tap, so wrap an interactive control with
triggerinstead ofchild. The builder receivestoggleand afocusNode. Passtoggleto the button’sonPressedand the focus node to the button. The kit hides the button’s own Material tooltip and keeps its name for screen readers. - An info icon never has a no-op
onPressed: it toggles its hint or opens a sheet. - Pass exactly one of
childandtrigger.
Longer explanations open a sheet
Section titled “Longer explanations open a sheet”A tooltip holds one line. An explanation that needs more, such as a promotion’s “Why this?” / “Kenapa ini?”, opens a sheet with a title, the text and one primary Close. See Promotions.
When not to use one
Section titled “When not to use one”A tooltip is easy to miss on a phone: nothing shows that it is there. It may only repeat or name something already on screen.
- Never put a fee, a requirement, a deadline or an error only in a tooltip. Show it on the page, in an info row or a notice banner.
- Do not put a tooltip on something people tap for another reason and expect them to discover it.
Placement, type and timing
Section titled “Placement, type and timing”The twelve placements are top, topStart, topEnd, bottom, bottomStart, bottomEnd, start, startTop, startBottom, end, endTop and endBottom. Start and end follow direction. A bubble flips when the opposite side fits, then shifts inside an 8 dp margin. Default placement is bottom.
Label names an icon-only trigger; description adds its semantic tooltip. The bubble is never interactive or focusable and needs an Overlay. A tap opens it at once, and a second tap closes it. Hover waits 500 ms by default; keyboard focus opens immediately. Escape, blur, exit, an outside tap and another tooltip close it. A hint opened by long press closes 1.5 seconds after release. Never put a fee, requirement or error only here.
Which variant when
Section titled “Which variant when”| Situation | Variant / composition | Payment example |
|---|---|---|
| Fee policy explanation | description | Attach to a focusable 48 dp trigger; use label only when replacing the trigger name. |
Use a focus view for interactive help content.
States
Section titled “States”The hint opens on tap, long press, hover or keyboard focus. Longer explanations belong in a sheet.
Do and don’t
Section titled “Do and don’t”Do: Attach to a focusable 48 dp trigger; use label only when replacing the trigger name.
Don’t: Put links or buttons inside tooltip content, or give an info icon a no-op onPressed.
Content guidelines
Section titled “Content guidelines”- One short sentence or a label, in sentence case, without end punctuation for labels.
- Do not repeat the visible text word for word. Add the detail it leaves out, such as the exact time.
Accessibility
Section titled “Accessibility”- The message is also the control’s tooltip in the semantics tree, so screen readers read it with the control.
- Keyboard focus opens it. Do not rely on a tooltip for anything a keyboard user needs.
In the example app
Section titled “In the example app”

PaymentTooltip
class PaymentTooltip extends StatefulWidget · lib/src/controls/controls.dart
A one-line, noninteractive hint (D49). It opens on tap, hover, long press or keyboard focus; a second tap, an outside tap, Escape, blur and exit close it. Screen readers get message through the trigger's semantics. Requires an Overlay.
Wrap text, an icon or a disabled control in child. For an interactive trigger such as an info PaymentIconButton, use trigger instead: the button's own press must toggle the hint, because it wins the tap.
Never put a fee, a requirement or an error only in a tooltip. An explanation longer than one line ("Why this?") opens a sheet instead.
| Parameter | Type | Default | Description |
|---|---|---|---|
message:required | String | — | — |
child: | Widget? | — | A non-interactive trigger; a tap on it toggles the hint. |
trigger: | Widget Function(VoidCallback toggle, FocusNode focusNode)? | — | Builds an interactive trigger that toggles the hint, e.g. an info PaymentIconButton with onPressed: toggle (D49). Pass focusNode to the button so keyboard focus shows the hint too. |
placement: | PaymentTooltipPlacement | PaymentTooltipPlacement.bottom | — |
type: | PaymentTooltipType | PaymentTooltipType.description | — |
delay: | Duration | const Duration(milliseconds: 500) | — |
PaymentTooltipPlacement
enum PaymentTooltipPlacement · lib/src/controls/controls.dart
Twelve placements; start and end follow the text direction.
| Value | Description |
|---|---|
top | Above the trigger, centered. |
topStart | Above the trigger, aligned to its start edge. |
topEnd | Above the trigger, aligned to its end edge. |
bottom | Below the trigger, centered. |
bottomStart | Below the trigger, aligned to its start edge. |
bottomEnd | Below the trigger, aligned to its end edge. |
start | On the start side of the trigger (left in LTR), centered. |
startTop | On the start side of the trigger (left in LTR), aligned to its top edge. |
startBottom | On the start side of the trigger (left in LTR), aligned to its bottom edge. |
end | On the end side of the trigger (right in LTR), centered. |
endTop | On the end side of the trigger (right in LTR), aligned to its top edge. |
endBottom | On the end side of the trigger (right in LTR), aligned to its bottom edge. |
PaymentTooltipType
enum PaymentTooltipType · lib/src/controls/controls.dart
Whether the message names the trigger or adds detail.
| Value | Description |
|---|---|
label | Becomes the trigger's semantic label. |
description | Becomes the trigger's semantic tooltip. |