@@ -11,7 +11,9 @@ class EnvelopRefreshIndicator extends StatelessWidget {
1111 static const _circleSize = 70.0 ;
1212
1313 static const _blurRadius = 10.0 ;
14- static const _defaultShadow = [BoxShadow (blurRadius: _blurRadius, color: Colors .black26)];
14+ static const _defaultShadow = [
15+ BoxShadow (blurRadius: _blurRadius, color: Colors .black26)
16+ ];
1517
1618 const EnvelopRefreshIndicator ({
1719 super .key,
@@ -27,16 +29,20 @@ class EnvelopRefreshIndicator extends StatelessWidget {
2729 return CustomRefreshIndicator (
2830 leadingScrollIndicatorVisible: leadingScrollIndicatorVisible,
2931 trailingScrollIndicatorVisible: trailingScrollIndicatorVisible,
30- builder: (context, child, controller) => LayoutBuilder (builder: (context, constraints) {
32+ builder: (context, child, controller) =>
33+ LayoutBuilder (builder: (context, constraints) {
3134 final widgetWidth = constraints.maxWidth;
3235 final widgetHeight = constraints.maxHeight;
3336 final letterTopWidth = (widgetWidth / 2 ) + 50 ;
3437
35- final leftValue = (widgetWidth + _blurRadius - ((letterTopWidth + _blurRadius) * controller.value / 1 ))
38+ final leftValue = (widgetWidth +
39+ _blurRadius -
40+ ((letterTopWidth + _blurRadius) * controller.value / 1 ))
3641 .clamp (letterTopWidth - 100 , double .infinity);
3742
3843 final rightShift = widgetWidth + _blurRadius;
39- final rightValue = (rightShift - (rightShift * controller.value / 1 )).clamp (0.0 , double .infinity);
44+ final rightValue = (rightShift - (rightShift * controller.value / 1 ))
45+ .clamp (0.0 , double .infinity);
4046
4147 final opacity = (controller.value - 1 ).clamp (0 , 0.5 ) / 0.5 ;
4248
@@ -79,23 +85,27 @@ class EnvelopRefreshIndicator extends StatelessWidget {
7985 child: Transform .scale (
8086 scale: controller.value,
8187 child: Opacity (
82- opacity: controller.isLoading || controller.state.isSettling ? 1 : opacity,
88+ opacity: controller.isLoading || controller.state.isSettling
89+ ? 1
90+ : opacity,
8391 child: Align (
8492 alignment: Alignment .center,
8593 child: Container (
8694 width: _circleSize,
8795 height: _circleSize,
8896 decoration: BoxDecoration (
8997 boxShadow: _defaultShadow,
90- color: accent ?? Theme .of (context).colorScheme.primary,
98+ color:
99+ accent ?? Theme .of (context).colorScheme.primary,
91100 shape: BoxShape .circle,
92101 ),
93102 child: Stack (
94103 fit: StackFit .expand,
95104 alignment: Alignment .center,
96105 children: < Widget > [
97106 CircularProgressIndicator (
98- valueColor: const AlwaysStoppedAnimation (Colors .black),
107+ valueColor:
108+ const AlwaysStoppedAnimation (Colors .black),
99109 value: controller.isLoading ? null : 0 ,
100110 ),
101111 const Icon (
@@ -128,7 +138,10 @@ class TrianglePainter extends CustomPainter {
128138 return radius * 0.57735 + 0.5 ;
129139 }
130140
131- TrianglePainter ({this .strokeColor = Colors .black, this .strokeWidth = 3 , this .paintingStyle = PaintingStyle .stroke});
141+ TrianglePainter (
142+ {this .strokeColor = Colors .black,
143+ this .strokeWidth = 3 ,
144+ this .paintingStyle = PaintingStyle .stroke});
132145
133146 @override
134147 void paint (Canvas canvas, Size size) {
@@ -139,7 +152,8 @@ class TrianglePainter extends CustomPainter {
139152 final path = getTrianglePath (size.width, size.height);
140153 final shadowPaint = Paint ()
141154 ..color = Colors .black.withAlpha (50 )
142- ..maskFilter = MaskFilter .blur (BlurStyle .normal, convertRadiusToSigma (10 ));
155+ ..maskFilter =
156+ MaskFilter .blur (BlurStyle .normal, convertRadiusToSigma (10 ));
143157 canvas.drawPath (path, shadowPaint);
144158
145159 canvas.drawPath (path, paint);
0 commit comments