Tinyrack

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

AxisContract
Layer sizelayerSize 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_ui
import '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

PropType / defaultPurpose
layerSizeTRLayerSize · content width / content heightSizes the complete menu, including its border and padding. It is available on TRMenu and TRMenuSubmenu.