搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫bruce-brookshire/flutter_dropdown_banner

flutter_dropdown_banner

用於 Flutter 的下拉式橫幅,可讓您通知使用者有關事件或提示操作

flutter_dropdown_banner 專案封面
星標
25
分支
5
最近推送(UTC)
2020年4月29日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

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 作者

Bruce Brookshire ↗

Director of Engineering, Dallas @ FortyAU

@fortyauDallas, TX
語言DartObjective-CJava

使用的依賴

依賴清單 3 項

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

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

GitHub Docs — About repositories ↗