一個輕量級、空安全的 Flutter 套件,專為顯示可自訂進度對話方塊而設計。支援動態內容更新,並提供多種樣式選項,確保跨平台的 UI 一致性。非常適合在非同步作業期間顯示載入狀態,確保類型安全並在 Android、iOS、Web、macOS、Windows 與 Linux 上提供順暢的使用者體驗。此套件易於整合與維護,適用於需要在資料處理過程中提供即時回饋之應用程式。
適用情境
在 API 呼叫期間顯示載入狀態
動態更新對話方塊文字
顯示檔案上傳過程中的進度
在後台任務期間提供反饋
自定外觀以保持品牌一致性
主要特色
空值安全設計
動態內容更新
多平台支援
可自訂的樣式
輕量且快速
與 Flutter 的輕鬆整合
適合對象
開發跨平台 Flutter 應用的開發者
重視類型安全的團隊
需要響應式載入指示器的應用程式
依賴項最少的專案
頻繁執行非同步操作的UI密集型應用
使用建議
需要 Flutter 2.5 或更高版本
僅限基本進度可視化
無內建取消處理
最適合簡單的加載場景
可能需要額外的邏輯來處理複雜的工作流程
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
progress_dialog
A light weight package to show progress dialog. As it is a stateful widget, you can change the text shown on the dialog dynamically.
This is the original package and it's owner
https://github.com/fayaz07/progress_dialog
It was discontinued by him, but i really liked the package so I am trynna revive it :D
I added null safety and updated most of the stuff making it null safe and useable again :)
Create and initialise a ProgressDialog object inside the build() method passing context to it
Initialize the ProgressDialog object
finalProgressDialog pr = ProgressDialog(context);
By default it is a normal dialog to show some message, if you would like to use it to show percentage of progress done, specify the optional type parameter and specify if you want your dialog to dismiss when back button is pressed isDismissible parameter (Optional)