build method
Function that builds the custom refresh indicator
Implementation
@override
Widget build(
BuildContext context,
Widget child,
IndicatorController controller,
) {
final Color backgroundColor = this.backgroundColor ??
ProgressIndicatorTheme.of(context).refreshBackgroundColor ??
Theme.of(context).canvasColor;
return Stack(
clipBehavior: Clip.hardEdge,
children: <Widget>[
scrollableBuilder(context, child, controller),
_PositionedIndicatorContainer(
edgeOffset: edgeOffset,
displacement: displacement,
controller: controller,
child: Transform.scale(
scale: controller.isFinalizing ? controller.value.clamp(0.0, 1.0) : 1.0,
child: Container(
width: 41,
height: 41,
margin: const EdgeInsets.all(4.0),
child: Material(
type: MaterialType.circle,
clipBehavior: clipBehavior,
color: backgroundColor,
elevation: elevation,
child: _InfiniteRotation(
running: withRotation && controller.isLoading,
child: builder(context, controller),
),
),
),
),
),
],
);
}