Skip to content
On this page

Tooltip

A short contextual explanation attached to a control.

Tooltip in FluttyUITooltip in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Tooltip

const Tooltip({
  super.key,
  this.size,
  required this.message,
  required this.child,
  this.enabled = true,
  this.waitDuration = const Duration(milliseconds: 400),
  this.showDuration = const Duration(seconds: 2),
  this.placement = CollisionPlacement.top,
  this.alignment = CollisionAlignment.center,
  this.offset = 8,
  this.collisionPadding = 8,
  this.maxWidth = 260,
  this.padding,
  this.borderRadius,
  this.backgroundColor,
  this.textStyle,
  this.motion,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
messageStringYes—
childWidgetYes—
enabledboolNotrue
waitDurationDurationNoconst Duration(milliseconds: 400)
showDurationDurationNoconst Duration(seconds: 2)
placementCollisionPlacementNoCollisionPlacement.top
alignmentCollisionAlignmentNoCollisionAlignment.center
offsetdoubleNo8
collisionPaddingdoubleNo8
maxWidthdoubleNo260
paddingEdgeInsetsGeometry?Nonull
borderRadiusdouble?Nonull
backgroundColorColor?Nonull
textStyleTextStyle?Nonull
motionComponentMotion?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/overlays/tooltip/tooltip.dart

This reference is generated from the Tooltip declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI