Last updated:
0 purchases
menu base
menu_base #
Used to create context or tray menus.
menu_base
Quick Start
Installation
Usage
Related Links
License
Quick Start #
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
menu_base: ^0.1.0
copied to clipboard
Or
dependencies:
window_manager:
git:
url: https://github.com/leanflutter/menu_base.git
ref: main
copied to clipboard
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,
),
],
),
),
],
);
copied to clipboard
Related Links #
https://github.com/leanflutter/contextual_menu
https://github.com/leanflutter/tray_manager
License #
MIT
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.