Import
import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;Usage
ui.Menu(
trigger: const Text('Actions'),
items: const [
ui.MenuItem(label: 'Edit', value: 'edit'),
ui.MenuItem(label: 'Duplicate', value: 'duplicate'),
],
onSelected: (value) {},
)API Reference
The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.
Menu
const Menu({
super.key,
this.motion,
this.controller,
this.openOnTap = true,
this.isCompact = false,
this.size,
this.openHaptic = HapticType.none,
required this.trigger,
required this.items,
this.onSelected,
this.width = 280,
this.backgroundColor,
this.foregroundColor,
this.borderColor,
this.borderRadius,
this.padding,
this.itemPadding,
this.closeOnSelect = true,
this.alignment = CollisionAlignment.center,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
motion | ComponentMotion? | No | null |
controller | MenuController? | No | null |
openOnTap | bool | No | true |
isCompact | bool | No | false |
size | ComponentSize? | No | null |
openHaptic | HapticType | No | HapticType.none |
trigger | Widget | Yes | — |
items | List<MenuItem> | Yes | — |
onSelected | ValueChanged<String>? | No | null |
width | double | No | 280 |
backgroundColor | Color? | No | null |
foregroundColor | Color? | No | null |
borderColor | Color? | No | null |
borderRadius | double? | No | null |
padding | EdgeInsetsGeometry? | No | null |
itemPadding | EdgeInsetsGeometry? | No | null |
closeOnSelect | bool | No | true |
alignment | CollisionAlignment | No | CollisionAlignment.center |
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/collections/menu/menu.dart
This reference is generated from the Menu declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

