Buscar pacotes, repositórios e categorias de apps

Capa de fab_circular_menu_plus
Detalhes do pacotev0.0.4

fab_circular_menu_plus

Um pacote Flutter para criar um bom menu circular usando um botão de ação flutuante.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
571
Curtidas
56
Pontos Pub
160

Instalar pacote

flutter pub add fab_circular_menu_plus

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

Um pacote Flutter que permite a criação de menus circulares elegantes centrados em um botão flutuante de ação (FAB). Ele oferece animações suaves e opções personalizáveis para os itens do menu, sendo ideal para aprimorar a interação com o usuário em aplicações móveis e web. O pacote suporta múltiplas plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux, garantindo comportamento consistente entre dispositivos. Com configuração intuitiva e design responsivo, simplifica a implementação da navegação baseada em FAB.

Casos de uso

  • Adicionando menus interativos de FAB em aplicativos móveis
  • Melhorando a IU com painéis de ação circulares animados
  • Criando interfaces de ação rápida contextualizadas
  • Implementando navegação orientada por gestos em aplicativos da web
  • Designando controles acessíveis e amigáveis ao toque

Principais recursos

  • Animação circular suave para expansão do menu
  • Layout e estilo personalizáveis do item do menu
  • Suporte para múltiplos destinos de plataforma
  • Integração fácil com componentes FAB existentes
  • Gestos e tempo de disparo configuráveis

Indicado para

  • Desenvolvedores construindo interfaces móveis ricas em recursos
  • Designers procurando interações dinâmicas do FAB
  • Equipes visando consistência entre plataformas
  • Aplicativos que exigem navegação baseada em gestos intuitivos
  • Projetos que enfatizam acabamento visual e engajamento do usuário

Considerações

  • Pode exigir ajustes de desempenho em dispositivos de baixa gama
  • Personalização limitada para comportamentos complexos de menu
  • Depende da estabilidade do sistema de gestos do Flutter
  • Não ideal para estruturas de menu densas
  • Mais adequado para um número moderado de itens de menu (4-8)

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

FAB Circular Menu

Pub package License Null safety Platform

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

Originally inspired by Mayur Kshirsagar's great FAB Microinteraction design. It is implemented as a Flutter plugin by Mariano Cordova (source code). This plugin is the continuation of the discontinued original plugin. I merged some of my bug fixes and made some changes to my liking.

I forked this plugin out of necessity and I have only a very limited time for maintenance, so PRs are highly welcome if any change is desired.

Showcase

Installation

Just add fab_circular_menu_plus to your pubspec.yml file

dependencies:
  fab_circular_menu_plus: ^0.0.1

Example

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Placeholder(),
        floatingActionButton: FabCircularMenuPlus(
          children: <Widget>[
            IconButton(icon: Icon(Icons.home), onPressed: () {
              print('Home');
            }),
            IconButton(icon: Icon(Icons.favorite), onPressed: () {
              print('Favorite');
            })
          ]
        )
      )
    );
  }
}

You can check for a more complete example in the example directory.

Customize

You can customize the widget appearance using the following properties:

Property Description Default
alignment Sets the widget alignment Alignment.bottomRight
ringColor Sets the ring color accentColor
ringDiameterLimitFactor Sets the ring diameter limit factor 1.5
ringDiameter Sets the ring diameter screenWidth * ringDiameterLimitFactor (portrait)
screenHeight * ringDiameterLimitFactor (landscape)
ringWidthLimitFactor Sets the ring width limit factor 0.2
ringWidth Sets the ring width ringDiameter * ringWidthLimitFactor
fabSize Sets the FAB size 64.0
fabElevation Sets the elevation for the FAB 8.0
fabColor Sets the FAB color primaryColor
fabOpenColor Sets the FAB color while the menu is open. This property takes precedence over fabColor -
fabCloseColor Sets the FAB color while the menu is closed. This property takes precedence over fabColor -
fabChild Sets the child inside the FAB. This property takes precedence over fabOpenicon and fabCloseIcon -
fabOpenIcon Sets the FAB icon while the menu is open Icon(Icons.menu)
fabCloseIcon Sets the FAB icon while the menu is closed Icon(Icons.close)
fabMargin Sets the widget margin EdgeInsets.all(16.0)
animationDuration Changes the animation duration Duration(milliseconds: 800)
animationCurve Allows you to modify the animation curve Curves.easeInOutCirc
onDisplayChange This callback is called every time the menu is opened or closed, passing the current state as a parameter. -

Handling the menu programmatically

It is possible to handle the menu programmatically by using a key. Just create a key and set it in the key property of the FabCircularMenuPlus, then use the key to get the current state and open, close or check the status of the menu.

class MyApp extends StatelessWidget {
  final GlobalKey<FabCircularMenuPlusState> fabKey = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: RaisedButton(
          onPressed: () {
            if (fabKey.currentState.isOpen) {
              fabKey.currentState.close();
            } else {
              fabKey.currentState.open();
            }
          },
          child: Text('Toggle menu')
        ),
        floatingActionButton: FabCircularMenuPlus(
          key: fabKey,
          children: <Widget>[
            // ...
          ]
        )
      )
    );
  }
}

Contributing

I will be very happy if you contribute to this project, feel free to submit a PR.

Categorias

Dependências

Lista de dependências 1 itens

Repositório-fonte

Projetos que usam este pacote