Status
Tooltip
LiqTooltip is a small contextual hint that appears on long-press
(touch) or hover (mouse) over its child. It is rendered in the nearest
overlay so it floats above all other content. Tooltips are smaller and
lighter than LiqPopover — meant for short hints, not full content
panels. The tooltip auto-flips to the opposite edge if the preferred
LiqTooltipPlacement would overflow the screen.
Top
import 'package:docs_snippets/src/snippet_frame.dart';import 'package:flutter/widgets.dart';import 'package:liqkit_ui/liqkit_ui.dart';/// Snippet builder consumed by `apps/docs_snippets/lib/src/routes.g.dart`.Widget tooltipTopBuilder(BuildContext context) { return SnippetFrame( maxWidth: 340, height: 260, child: Stack( alignment: Alignment.topCenter, children: <Widget>[ Positioned( top: 112, child: LiqTooltip( message: 'Add a new project', child: LiqButton(label: 'New', onPressed: () {}), ), ), const Positioned( bottom: 24, child: SnippetLabel( 'Long-press or hover to reveal the tooltip.', fontSize: 13, ), ), ], ), );}
Bottom
import 'package:docs_snippets/src/snippet_frame.dart';import 'package:flutter/widgets.dart';import 'package:liqkit_ui/liqkit_ui.dart';/// Snippet builder consumed by `apps/docs_snippets/lib/src/routes.g.dart`.Widget tooltipBottomBuilder(BuildContext context) { return SnippetFrame( maxWidth: 340, height: 260, child: Stack( alignment: Alignment.topCenter, children: <Widget>[ Positioned( top: 58, child: LiqTooltip( message: 'Add a new project', placement: LiqTooltipPlacement.bottom, child: LiqButton(label: 'New', onPressed: () {}), ), ), const Positioned( bottom: 24, child: SnippetLabel( 'Long-press or hover to reveal the tooltip.', fontSize: 13, ), ), ], ), );}
With Arrow
// ignore_for_file: file_names // hyphenated name required by snippet manifest conventionimport 'package:docs_snippets/src/snippet_frame.dart';import 'package:flutter/widgets.dart';import 'package:liqkit_ui/liqkit_ui.dart';/// Snippet builder consumed by `apps/docs_snippets/lib/src/routes.g.dart`.Widget tooltipWithArrowBuilder(BuildContext context) { return SnippetFrame( maxWidth: 360, height: 260, child: Stack( alignment: Alignment.topCenter, children: <Widget>[ Positioned( top: 124, child: LiqTooltip( message: 'Create a brand new project. Tooltips wrap to multiple lines ' 'when the message is longer than 240pt.', child: LiqButton(label: 'New', onPressed: () {}), ), ), const Positioned( bottom: 24, child: SnippetLabel( 'Long-press or hover to reveal the tooltip.', fontSize: 13, ), ), ], ), );}