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

flutter_hot_toast 封面
套件詳情v0.0.3

flutter_hot_toast

一個非常酷且簡單的帶動畫的提示框。此項目深受 React Hot Toast 啟發。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
153
喜歡數
33
Pub 分數
120

安裝套件

flutter pub add flutter_hot_toast

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個輕量級且帶有動畫效果的吐司通知套件,靈感來自 React Hot Toast。它提供流暢、視覺上吸引人的吐司訊息,設定簡單。支援 Android、iOS、Web、macOS、Windows 和 Linux 等多個平台。非常適合以現代、引人入勝的方式傳遞簡短的使用者回饋。

適用情境

  • 顯示快速使用者回饋
  • 顯示成功或錯誤訊息
  • 透過細微的動畫增強使用者介面
  • 提供臨時警告
  • 透過視覺提示改善使用者體驗

主要特色

  • 流暢的動畫
  • 最小設定
  • 跨平台支援
  • 可自定外觀
  • 簡單 API
  • 響應式設計

適合對象

  • 初學者 Flutter 開發者
  • 需要輕量級通知的應用程式
  • 注重介面打磨的專案
  • 快速原型設計
  • 使用者友好的介面

使用建議

  • 超出基礎樣式的自訂選項有限
  • 不適合複雜的通知工作流程
  • 依賴外部動畫庫
  • 可能需要額外的樣式以支援深色模式
  • 最適合簡單、短暫的訊息

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flutter Hot Toast

A very cool and simple flutter toast that is highly inspired by React Hot Toast

Features

Video preview

Getting started

First wrap your Material App with GlobalLoaderOverlay

Widget build(BuildContext context) {
    return GlobalLoaderOverlay(
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: const Home(),
      ),
    );
  }

Now you can call the toast to show in any part of your widget that is being encapsulated in the MaterialApp widget by:

context.loaderOverlay.show(
            widget: FlutterHotToast.loading(
              height: 70,
              width: 280,
              label: const Text(
                'loading...😬',
                style: TextStyle(
                  fontSize: 30,
                ),
              ),
            ),
          );

Usage

FloatingActionButton(
        child: const Icon(Icons.add),
        onPressed: () {
          context.loaderOverlay.show(
            widget: FlutterHotToast.loading(
              height: 70,
              width: 280,
              label: const Text(
                'loading...😬',
                style: TextStyle(
                  fontSize: 30,
                ),
              ),
            ),
          );
          Future.delayed(const Duration(seconds: 2), () {
            context.loaderOverlay.show(
              widget: FlutterHotToast.success(
                context,
                height: 70,
                width: 280,
                label: const Text(
                  'success ✅',
                  style: TextStyle(
                    fontSize: 30,
                  ),
                ),
              ),
            );
          });
        },
      ),

Additional information

This package uses lottie, loader_overlay and flutter_animate under the hood.

You can find the repository link at github to contribute to this project.


If you like this project, please follow me on github

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。