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

rounded_loading_button_plus 封面
套件詳情v3.0.1

rounded_loading_button_plus

Flutter 的一個簡單動畫載入按鈕小部件實作

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2660
喜歡數
79
Pub 分數
155

安裝套件

flutter pub add rounded_loading_button_plus

套件介紹

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

一個 Flutter 套件,提供具有平滑過渡和可自訂樣式之動畫載入按鈕元件。它透過在表單提交或 API 呼叫等動作期間視覺化顯示載入狀態,以提升使用者體驗。此按鈕支援圓形與圓角矩形兩種形狀,並可自訂顏色、大小與動畫速度。設計簡潔且效能優異,能無縫整合至任何跨平台的 Flutter 應用程式中。

適用情境

  • 表單提交帶載入狀態
  • API 呼叫觸發
  • 使用者驗證流程
  • 互動式 UI 元素
  • 行動應用程式中的進度指示

主要特色

  • 動畫加載過渡
  • 可自訂按鈕形狀
  • 可設定的顏色和尺寸
  • 跨平台支援
  • 與 onPressed 的簡單整合
  • 平滑的動畫效果

適合對象

  • 開發互動式表單的開發者
  • 需要在非同步操作期間提供視覺反饋的應用程式
  • 以使用者介面為導向的 Flutter 項目
  • 初學者到中級 Flutter 開發者
  • 針對 Android、iOS、Web、macOS、Windows 與 Linux 的專案

使用建議

  • 基本使用所需的設定極少
  • 超出核心屬性的自訂功能有限
  • 無內建錯誤處理
  • 最適合簡單的加載場景
  • 不適合複雜的狀態管理

原始 README

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

rounded_loading_button_plus

pub package build codecov style: effective dart License: MIT Awesome Flutter

RoundedLoadingButton is a Flutter package with a simple implementation of an animated loading button, complete with success and error animations.

Installation

Add this to your pubspec.yaml:

dependencies:
    rounded_loading_button_plus: ^2.0.8

Usage

Import
import 'package:rounded_loading_button_plus/rounded_loading_button_plus.dart';
Simple Implementation
final RoundedLoadingButtonController _btnController = RoundedLoadingButtonController();

void _doSomething() async {
    Timer(Duration(seconds: 3), () {
        _btnController.success();
    });
}

RoundedLoadingButton(
    child: Text('Tap me!', style: TextStyle(color: Colors.white)),
    controller: _btnController,
    onPressed: _doSomething,
)

The Rounded Loading Button has many configurable properties, including:

  • duration - The duration of the button animation
  • loaderSize - The size of the CircularProgressIndicator
  • animateOnTap - Whether to trigger the loading animation on the tap event
  • resetAfterDuration - Reset the animation after specified duration, defaults to 15 seconds
  • errorColor - The color of the button when it is in the error state
  • successColor - The color of the button when it is in the success state
  • successIcon - The icon for the success state
  • failedIcon - The icon for the failed state

Contributions

All contributions are welcome!

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案