Bump version to 1.0.2+4, implement native state restoration, and clean up UI

This commit is contained in:
esefxdz committed 2026-06-04 19:00:19 +03:00
1 parent 61be397058
commit 208da38586
4 files changed
+34 -69

No files matched your search

-67
View File
@@ -22,31 +22,6 @@ class ClockDisplay extends StatelessWidget {
child: Stack(
alignment: Alignment.center,
children: [
// Background quota track ring
const CustomPaint(
size: Size(200, 200),
painter: _ArcPainter(
progress: 1.0,
color: Color.fromRGBO(74, 85, 104, 0.2),
strokeWidth: 4,
),
),
// Live quota progress ring
TweenAnimationBuilder<double>(
tween: Tween(begin: 0, end: timer.progress),
duration: const Duration(milliseconds: 400),
builder: (context, value, _) => CustomPaint(
size: const Size(200, 200),
painter: _ArcPainter(
progress: value,
color: _cyanGlow,
strokeWidth: 4,
glow: true,
),
),
),
// Center content: countdown + speed
Column(
mainAxisSize: MainAxisSize.min,
@@ -94,45 +69,3 @@ class ClockDisplay extends StatelessWidget {
);
}
}
class _ArcPainter extends CustomPainter {
final double progress;
final Color color;
final double strokeWidth;
final bool glow;
const _ArcPainter({
required this.progress,
required this.color,
this.strokeWidth = 4,
this.glow = false,
});
@override
void paint(Canvas canvas, Size size) {
final rect = Rect.fromLTWH(0, 0, size.width, size.height)
.deflate(strokeWidth / 2);
if (glow) {
final glowPaint = Paint()
..color = const Color.fromRGBO(0, 229, 255, 0.15)
..style = PaintingStyle.stroke
..strokeWidth = strokeWidth + 8
..strokeCap = StrokeCap.round
..maskFilter = const MaskFilter.blur(BlurStyle.normal, 8);
canvas.drawArc(rect, -pi / 2, 2 * pi * progress, false, glowPaint);
}
final paint = Paint()
..color = color
..style = PaintingStyle.stroke
..strokeWidth = strokeWidth
..strokeCap = StrokeCap.round;
canvas.drawArc(rect, -pi / 2, 2 * pi * progress, false, paint);
}
@override
bool shouldRepaint(covariant _ArcPainter old) =>
old.progress != progress || old.color != color;
}