tuiBuild method
Implementation
@override
Widget tuiBuild(BuildContext context, TUIKitBuildValue value) {
if (_noMore) return Container();
// 开启动画
if (_refreshState == RefreshMode.done ||
_refreshState == RefreshMode.inactive) {
_isAnimated = false;
} else if (!_isAnimated) {
_isAnimated = true;
_ballSize1 = 4.0;
_ballSize2 = 11.0;
_ballSize3 = 18.0;
_loopAnimated();
}
return Stack(
children: <Widget>[
Positioned(
top: 0.0,
bottom: 0.0,
left: 0.0,
right: 0.0,
child: Container(
alignment: Alignment.center,
height: _indicatorExtent,
color: widget.backgroundColor,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
width: 20.0,
height: 20.0,
child: Center(
child: ClipOval(
child: AnimatedContainer(
color: widget.color,
height: _ballSize1,
width: _ballSize1,
duration: _ballSizeDuration,
),
),
),
),
Container(
width: 5.0,
),
SizedBox(
width: 20.0,
height: 20.0,
child: Center(
child: ClipOval(
child: AnimatedContainer(
color: widget.color,
height: _ballSize2,
width: _ballSize2,
duration: _ballSizeDuration,
),
),
),
),
Container(
width: 5.0,
),
SizedBox(
width: 20.0,
height: 20.0,
child: Center(
child: ClipOval(
child: AnimatedContainer(
color: widget.color,
height: _ballSize3,
width: _ballSize3,
duration: _ballSizeDuration,
),
),
),
),
],
),
),
),
],
);
}