Menu
Open commands, persistent settings, and cascading submenus from an anchored Flutter trigger.
Open density-aware commands, persistent checkbox or radio settings, and cascading submenus from an anchored trigger.
Contract
| Axis | Contract |
|---|---|
| Layer size | layerSize applies to the complete root menu or TRMenuSubmenu. By default, content width stays between TRMeasurements.measureMd and TRMeasurements.overlayWidthSm + TRSpacing.twoExtraLarge, and content height is capped at TRMeasurements.measureXl. |
Install
Add the package, then import its public library.
flutter pub add tinyrack_uiimport 'package:tinyrack_ui/tinyrack_ui.dart';Playground
Usage
import 'package:material_ui/material_ui.dart';
import 'package:tinyrack_ui/tinyrack_ui.dart';
TRMenu(
trigger: const Text('View'),
menuChildren: [
TRMenuItem(onPressed: duplicate, child: const Text('Duplicate')),
TRMenuCheckboxItem(
value: showGrid,
onChanged: setShowGrid,
child: const Text('Show grid'),
),
],
)Examples
API
Layer properties
| Prop | Type / default | Purpose |
|---|---|---|
layerSize | TRLayerSize · content width / content height | Sizes the complete menu, including its border and padding. It is available on TRMenu and TRMenuSubmenu. |