flutter_dropdown_banner
Ein Dropdown-Banner für Flutter, das es Ihnen ermöglicht, Ihren Benutzer über ein Ereignis zu informieren oder eine Aktion anzufordern
- Sterne
- 25
- Forks
- 5
- Letzter Push (UTC)
- 29.04.2020
- Projektstatus
- Aktiv
Original-README
Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
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.
Verwendete Abhängigkeiten
Abhängigkeiten 3 Einträge
- dart_notification_center
^1.0.0+1 - flutter
{"sdk":"flutter"} - flutter_testEntwicklung
{"sdk":"flutter"}
Wie wähle ich ein passendes Repository?
Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.
- Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
- Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
- Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.
Quellen und Pflege
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
