스타 메뉴는 다양한 형태, 정밀한 애니메이션 제어 및 유연한 위치 지정을 지원하는 사용자 정의 가능한 컨텍스트 팝업 메뉴를 제공하는 플러터 패키지입니다. 개발자는 거의 모든 위젯을 메뉴 항목으로 배치할 수 있어 풍부한 인터랙티브 디자인을 가능하게 합니다. 여러 플랫폼에서 직관적이고 시각적으로 매력적인 메뉴를 만들기에 적합하며, 부드러운 전환과 동적 레이아웃을 통해 사용자 경험을 향상시킵니다. 문서화가 잘 되어 있으며 지속적으로 유지 관리되고 있어 기존 프로젝트에 쉽게 통합할 수 있습니다.
사용 사례
모바일 앱에서 사용자 정의 컨텍스트 메뉴
애니메이션 효과가 있는 상호작용 UI 요소
크로스 플랫폼 메뉴 구현
시각 피드백을 제공하는 개선된 탐색
동적 위젯 기반 메뉴 항목
주요 기능
사용자 정의 모양의 메뉴 지원
세밀한 애니메이션 사용자 정의
유연한 위치 지정 옵션
모든 위젯을 메뉴 항목으로 사용할 수 있는 호환성
다중 플랫폼 지원 (Android, iOS, Web, macOS, Windows, Linux)
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: