Skip to content
On this page

Popover

An anchored floating surface for contextual content.

Popover in FluttyUIPopover in FluttyUI dark theme

Import

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

Usage

const ui.Popover(
  trigger: Text('Show details'),
  title: Text('More information'),
  child: Text('Contextual content stays close to its trigger.'),
)

API Reference

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

Popover

const Popover({
  super.key,
  this.size,
  this.motion,
  required this.trigger,
  required this.child,
  this.title,
  this.description,
  this.placement = PopoverPlacement.bottom,
  this.alignment = PopoverAlignment.start,
  this.offset = 12,
  this.collisionPadding = 8,
  this.width = 340,
  this.padding,
  this.backgroundColor,
  this.borderColor = const Color(0x00000000),
  this.borderRadius,
  this.textStyle,
  this.titleStyle,
  this.descriptionStyle,
  this.styleTrigger = true,
  this.triggerBackgroundColor,
  this.triggerForegroundColor,
  this.triggerPadding,
  this.triggerBorderRadius,
  this.dismissOnTapOutside = true,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
motionComponentMotion?Nonull
triggerWidgetYes—
childWidgetYes—
titleWidget?Nonull
descriptionWidget?Nonull
placementPopoverPlacementNoPopoverPlacement.bottom
alignmentPopoverAlignmentNoPopoverAlignment.start
offsetdoubleNo12
collisionPaddingdoubleNo8
widthdoubleNo340
paddingEdgeInsetsGeometry?Nonull
backgroundColorColor?Nonull
borderColorColorNoconst Color(0x00000000)
borderRadiusdouble?Nonull
textStyleTextStyle?Nonull
titleStyleTextStyle?Nonull
descriptionStyleTextStyle?Nonull
styleTriggerboolNotrue
triggerBackgroundColorColor?Nonull
triggerForegroundColorColor?Nonull
triggerPaddingEdgeInsetsGeometry?Nonull
triggerBorderRadiusdouble?Nonull
dismissOnTapOutsideboolNotrue

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/popover/popover.dart

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

DartFlutter

Get started with FluttyUI