mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Tweak cloud progress indicator design
This commit is contained in:
parent
938a0dfb4f
commit
2e9d70d878
1 changed files with 31 additions and 22 deletions
|
@ -91,7 +91,9 @@ class _Indicator extends AnimatedWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final thisValue = value ?? _progress.value;
|
||||
final stroke = size / 12;
|
||||
final stroke = size * .07;
|
||||
final offsetX = size * .06;
|
||||
final offsetY = size * .15;
|
||||
const curve = Curves.easeInOutQuad;
|
||||
return Transform.scale(
|
||||
scaleX: isInvert ? -1 : 1,
|
||||
|
@ -100,37 +102,44 @@ class _Indicator extends AnimatedWidget {
|
|||
padding: EdgeInsets.all(stroke / 2),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: stroke,
|
||||
value: curve.transform((thisValue * 3).clamp(0, 1)),
|
||||
flex: 3,
|
||||
child: Transform.translate(
|
||||
offset: Offset(offsetX, 0),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: stroke,
|
||||
value: curve.transform((thisValue * 3).clamp(0, 1)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: stroke / 2),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: stroke,
|
||||
value: curve.transform((thisValue * 3 - 1).clamp(0, 1)),
|
||||
flex: 5,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, -offsetY),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: stroke,
|
||||
value: curve.transform((thisValue * 3 - 1).clamp(0, 1)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: stroke / 2),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: stroke,
|
||||
value: curve.transform((thisValue * 3 - 2).clamp(0, 1)),
|
||||
flex: 3,
|
||||
child: Transform.translate(
|
||||
offset: Offset(-offsetX, 0),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: stroke,
|
||||
value: curve.transform((thisValue * 3 - 2).clamp(0, 1)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue