Buscar pacotes, repositórios e categorias de apps

Repositório GitHubbruce-brookshire/flutter_dropdown_banner

flutter_dropdown_banner

Um banner de queda para o flutter que permite notificar seu usuário sobre um evento ou solicitar uma ação

Capa do projeto flutter_dropdown_banner
Estrelas
25
Forks
5
Último push (UTC)
29 de abr. de 2020
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Pub

dropdown_banner

DropdownBanner manages the creation and animation of banner ui elements that are useful for displaying warnings and updates to users. It is simple to use and effective at event communication.

Getting Started

Using the dropdown banner is quite intuitive and simple. Below is a quick example of how to use it!

In your main.dart when creating the app
import 'packages:dropdown_banner/dropdown_banner.dart';
...
class MainApp extends StatelessWidget {
  ...
  @override
  Widget build(BuildContext context) {
    final navigatorKey = GlobalKey<NavigatorState>();
    ...
    return MaterialApp(
        ...
        home: DropdownBanner(
          child: Scaffold(...),
          navigatorKey: navigatorKey,
        ),
    );
  }
}
Generate a banner event
import 'packages:dropdown_banner/dropdown_banner.dart';
...
class SomeClass {
  ...
  void doSomethingThenFail() {
    DropdownBanner.showBanner(
      text: 'Failed to complete network request',
      color: SKColors.warning_red,
      textStyle: TextStyle(color: Colors.white),
    );
  }
}

Planned improvements

If this package gets any traction, I plan to add support for images, custom widgets, animation duration.. etc. If you have any ideas for making this package more applicable, just open an issue!

Other info

This package uses another of my packages, dart_notification_center, for implementing the observer pattern. This is what makes using the banner so simple! Check it out if you find a need for it.

Bruce Brookshire GitHub avatar
Autor no GitHub

Bruce Brookshire ↗

Director of Engineering, Dallas @ FortyAU

@fortyauDallas, TX
LinguagensDartObjective-CJava

Dependências usadas

Lista de dependências 3 itens

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗