menu_base 0.1.1 icon indicating copy to clipboard operation
menu_base: ^0.1.1 copied to clipboard

Used to create context or tray menus.

menu_base #

pub version

Used to create context or tray menus.


Quick Start #

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  menu_base: ^0.1.0

Or

dependencies:
  window_manager:
    git:
      url: https://github.com/leanflutter/menu_base.git
      ref: main

Usage #

import 'package:flutter/material.dart' hide MenuItem;
import 'package:menu_base/menu_base.dart';

Menu menu = Menu(
  items: [
    MenuItem(
      label: 'Copy',
      onClick: (_) {
        BotToast.showText(text: 'Clicked Copy');
      },
    ),
    MenuItem(
      label: 'Disabled item',
      disabled: true,
    ),
    MenuItem.separator(),
    MenuItem.submenu(
      label: 'Submenu',
      submenu: Menu(
        items: [
          MenuItem.checkbox(
            key: 'checkbox1',
            label: 'Checkbox1',
            checked: true,
            onClick: (menuItem) {
              menuItem.checked = !(menuItem.checked == true);
            },
          ),
          MenuItem.checkbox(
            label: 'Checkbox2',
            checked: false,
          ),
          MenuItem.checkbox(
            label: 'Checkbox3',
            checked: null,
          ),
        ],
      ),
    ),
  ],
);

License #

MIT

1
likes
100
pub points
57%
popularity

Publisher

verified publisher iconleanflutter.org

Used to create context or tray menus.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on menu_base