Package selection guidance compiled from public package information, community data, and project usage.
Star Menu is a Flutter package that provides a customizable contextual popup menu with support for various shapes, precise animation control, and flexible positioning. It allows developers to place nearly any widget as a menu entry, enabling rich interactive designs. Ideal for creating intuitive, visually appealing menus in apps across multiple platforms, it enhances user experience with smooth transitions and dynamic layouts. The package is well-documented and actively maintained, making it easy to integrate into existing projects.
Use cases
Custom context menus in mobile apps
Interactive UI elements with animated entries
Cross-platform menu implementations
Enhanced navigation with visual feedback
Dynamic widget-based menu items
Key features
Support for custom-shaped menus
Fine-grained animation customization
Flexible positioning options
Compatibility with any widget as menu item
Multi-platform support (Android, iOS, Web, macOS, Windows, Linux)
Easy integration via pub.dev
Suitable for
Developers building interactive Flutter applications
Designers seeking advanced menu animations
Teams targeting multiple platforms with consistent UI
Apps requiring contextual, on-demand menus
Projects emphasizing visual polish and user engagement
Considerations
May require additional styling for complex layouts
Performance impact with large numbers of menu items
Learning curve for advanced animation settings
Not ideal for simple static menus
Requires careful handling of context and positioning in complex widgets
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
A simple way to attach a popup menu to any widget with any widget as menu entries.
Menu entry widgets can bind a sub-menu with different shapes.
Multiple ways to fine-tune animation and position.
Every widgets can be tapped to display a popup menu!
There are currently 3 shapes to choose:
linear: items are lined by a given angle with a given space between them and with a 3-way alignment.
circle: items are lined up in a circle shape with a given radius and a star-end angle.
grid: items are aligned in a grid shape with N columns and a given horizontal and vertical space.
install the package with flutter pub add star_menu
feed the items parameter with the menu entry widgets list
set the params with StarMenuParameters
set the child with a widget you wish to press to open the menu
StarMenu(
params: StarMenuParameters(),
onStateChanged: (state) => print('State changed: $state'),
onItemTapped: (index, controller) {
// here you can programmatically close the menuif (index == 7)
controller.closeMenu();
print('Menu item $index tapped');
}),
items: entries,
child: FloatingActionButton(
onPressed: () {print('FloatingActionButton tapped');},
child: Icon(Icons.looks_one),
),
)
onStateChanged triggers menu state canges:
enumMenuState {
closed,
closing,
opening,
open,
}
items parameter is used when entries are known.
If you want to build items in runtime use lazyItems,
ie when StarMenu is already builded in the widget tree, but the menu items changed: