Search packages, repositories and app categories

GitHub repositorybruce-brookshire/flutter_dropdown_banner

flutter_dropdown_banner

A dropdown banner for flutter than enables you to notify your user of an event or prompt action

flutter_dropdown_banner project cover
Stars
25
Forks
5
Last push (UTC)
Apr 29, 2020
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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
GitHub author

Bruce Brookshire ↗

Director of Engineering, Dallas @ FortyAU

@fortyauDallas, TX
LanguagesDartObjective-CJava

Dependencies used

Dependency list 3 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

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

GitHub Docs — About repositories ↗