v1.3.0loading_animation_widget
載入動畫或載入旋轉圖示或載入器。用於在應用程式處於載入狀態或某項作業需要不確定時間處理時顯示載入動畫。
Flutter 載入動畫組件。
以下為英文專案原文快照,最新內容請造訪 GitHub。
Add loading_animation_widget: to your pubspec.yaml dependencies then run flutter pub get
dependencies:
loading_animation_widget:
Add this line to import the package.
import 'package:loading_animation_widget/loading_animation_widget.dart';
All loading animation APIs are same straight forward. There is a static method for each animation inside LoadingAnimationWidget class, which returns the Object of that animation. Both size and color are required some animations need more than one color.
Loading animation with one color
Scaffold(
body: Center(
child: LoadingAnimationWidget.staggeredDotsWave(
color: Colors.white,
size: 200,
),
),
Loading animation with more than one color. You have to provide both required colors.
Scaffold(
body: Center(
child: LoadingAnimationWidget.twistingDots(
leftDotColor: const Color(0xFF1A1A3F),
rightDotColor: const Color(0xFFEA3799),
size: 200,
),
),
|
waveDots
|
inkDrop
|
twistingDots
|
threeRotatingDots
|
staggeredDotsWave
|
fourRotatingDots
|
fallingDot
|
progressiveDots
|
discreteCircular
|
threeArchedCircle
|
bouncingBall
|
flickr
|
hexagonDots
|
beat
|
twoRotatingArc
|
horizontalRotatingDots
|
newtonCradle
|
stretchedDots
|
halfTriangleDot
|
dotsTriangle
|
● Sliding Clipped Nav Bar
● Water Drop Nav Bar
● Swipeable Tile
➜ Loading Animation Widget
依賴清單 3 項
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗