captionText static method

Widget captionText(
  1. BuildContext context,
  2. String text, {
  3. String? tooltip,
})

Creates a caption-styled Text widget with optional tooltip.

Parameters:

  • context: The build context to access theme data
  • text: The text to display
  • tooltip: Optional tooltip text

Implementation

static Widget captionText(BuildContext context, String text,
    {String? tooltip}) {
  Widget w = Text(text, style: captionStyle(context));
  return tooltip == null || tooltip.isEmpty ? w : w.tooltip(tooltip);
}