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 ↗