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

套件詳情v1.0.1

spinner

一個簡單的動畫旋轉器,循環遍歷固定大小的組件列表

近 30 天下載
15
喜歡數
23
Pub 分數
40

安裝套件

flutter pub add spinner

套件介紹

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

一個輕量級的Flutter套件,提供一個簡單的動畫旋轉器,以循環方式在預定義的固定大小小部件列表中切換。非常適合用於指示載入狀態或持續進行的過程,並提供流暢的視覺反饋。該旋轉器可自訂且容易整合到任何介面中,提供乾淨高效的方式來增強異步作業期間的使用者體驗。

適用情境

  • 表單中的載入指示器
  • 顯示正在進行的後台任務
  • 在資料擷取過程中提升使用者體驗
  • 導航過渡中的視覺反饋
  • 簡單的動畫佔位符

主要特色

  • 圓形小部件循環
  • 固定大小的 widget 支援
  • 平滑的動畫過渡
  • 所需設定最少
  • 輕量且高效

適合對象

  • 尋求簡單加載動畫的開發者
  • 需要細微視覺提示的UI設計師
  • 需要輕量級進度指示器的應用程式
  • 性能限制嚴格的專案

使用建議

  • 限於固定大小的組件
  • 無內建的旋轉速度自訂選項
  • 不適合複雜的動畫
  • 需要手動處理 widget 生命週期
  • 依賴外部來源程式碼以取得更新

原始 README

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

Spinner

This flutter package implements a simple Spinner animation that cycles through any number of fixed size child widgets. Useful for selecting a random word from a list and displaying it to a user.

It can animate vertically, up or down:

Or horizontally, left or right:

Usage

To use this plugin, add spinner as a dependency in your pubspec.yaml file.

Example

See the example project in the repo for a quick demo

API

Spinner has several useful parameters. You can see them used in the example file

  • duration: change the duration of the animation

  • animationSpeed: change how fast the animation moves and what index the animation lands on

  • spinDirection: change the direction of animation

  • containerCount: number of containers that should appear on screen

  • containerSize: for vertical scroll, this is the width of each container produced by the builder function. For horizontal, this is the height

  • builder: a function that takes in an integer and returns a widget with height/width of containerSize

  • curve: the curve for the animation to follow. Defaults to easeInOutCubic

  • callback: a function called when the animation completes

  • zoomFactor: optional zoom in by this amount during the animation. It looks something like this, with a zoom factor of 1.5:

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。