RepositoryDart
marianocordoba

marianocordoba/fab-circular-menu

A Flutter package to create a nice circular menu using a Floating Action Button.

197stars
68forks
9issues
0views

🎯 FAB Circular Menu — Menu tròn xoay từ FAB cho Flutter

Package nhẹ gọn biến Floating Action Button thành menu tròn trải ra với hiệu ứng animation đẹp mắt, lấy cảm hứng từ thiết kế FAB Microinteraction của Mayur Kshirsagar.

fab-circular-menu là một Flutter package do Mariano Córdoba phát triển, giải quyết bài toán phổ biến: cần nhiều action nhanh từ một FAB đơn lẻ mà không làm rối giao diện. Thay vì dùng bottom sheet hay dialog, package này cho menu các icon/action trải ra theo cung tròn xung quanh FAB khi nhấn — animation mượt, bán kính và độ rộng vòng tròn tự tính theo màn hình, hỗ trợ null safety và tùy biến gần như mọi khía cạnh giao diện.

✨ Điểm nổi bật

  • Menu tròn từ FAB: Chuyển đổi FAB đơn thành menu radial với danh sách widget con tùy ý (IconButton, FloatingActionButton, v.v.)
  • Animation cấu hình được: Thời lượng (animationDuration), đường cong (animationCurve — mặc định Curves.easeInOutCirc)
  • Tùy biến hình thức đầy đủ: ringColor, ringDiameter, ringWidth, fabSize, fabElevation, fabColor, fabOpenColor, fabCloseColor, fabMargin, alignment
  • Icon trạng thái mở/đóng: fabOpenIcon (mặc định Icons.menu), fabCloseIcon (mặc định Icons.close), hoặc thay bằng fabChild tùy chỉnh hoàn toàn
  • Callback trạng thái: onDisplayChange trả về trạng thái mở/đóng mỗi lần thay đổi
  • Điều khiển lập trình: Dùng GlobalKey<FabCircularMenuState> để open(), close(), kiểm tra isOpen từ bất kỳ đâu trong widget tree
  • Hỗ trợ null safety: Sẵn sàng cho Flutter hiện đại

💡 Vì sao đáng chú ý

Khác với các giải pháp custom overlay hay stack phức tạp, fab-circular-menu gói gọn toàn bộ logic layout vòng tròn, animation và hit-testing vào một widget đơn giản — chỉ cần drop vào floatingActionButton của Scaffold. Tham số ringDiameter mặc định tính theo screenWidth * 1.25 (portrait) / screenHeight * 1.25 (landscape) giúp menu tự co giãn hợp lý trên mọi kích thước màn hình mà không cần tính toán thủ công. Việc expose state qua GlobalKey cho phép tích hợp với logic nghiệp vụ (ví dụ: đóng menu khi user navigate, hoặc mở từ nút bấm khác) mà không cần wrapper thêm. Package nhẹ (~1 file Dart chính), API tối giản, phù hợp cho app cần quick-actions gọn gàng, nhất quán Material Design.


#Flutter #FAB #CircularMenu #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryKotlin
robertlevonyan/custom-floating-action-button

This view is for replacement of standard Floating Action Button from Google Support Library. It is easy to use, customizable and you can also add text to button

385
Oct 30, 2023
RepositoryJava
Winstonokk/DragFloatingActionButton

一个可以随处拖曳FloatingActionButton,边缘自动吸附,可设置按钮悬浮透明度,拖曳避免阻挡界面视图无法查看。

295
Dec 5, 2018
RepositoryDart
felangel/bloc

A predictable state management library that helps implement the BLoC design pattern

12.5k
Oct 25, 2026
RepositoryJava
RanyAlbegWein/SpringFabMenu

A menu of FloatingActionButton items, designed to be anchored on an AppBarLayout.

130
Mar 25, 2018
RepositorySwift
pedrommcarrasco/Hover

🎈 The smartest floating button

123
Dec 28, 2022
RepositoryDart
localsend/localsend

An open-source cross-platform alternative to AirDrop

96.0k
Oct 25, 2026
RepositoryDart
Solido/awesome-flutter

An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.

61.7k
Sep 3, 2026
RepositoryDart
chen08209/FlClash

A multi-platform proxy client based on ClashMeta,simple and easy to use, open-source and ad-free.

58.8k
Oct 24, 2026
RepositoryRust
rustdesk/rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

127.3k
Oct 27, 2026