Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
splash_screen_circles_painter.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2
4 final double progress;
5
6 SplashScreenCirclesPainter({required this.progress});
7
8 @override
9 void paint(Canvas canvas, Size size) {
10 final paint = Paint()
11 ..color = Colors.white.withValues(alpha: 0.1)
12 ..style = PaintingStyle.fill;
13
14 final circlePositions = [
15 Offset(size.width * 0.2, size.height * 0.2),
16 Offset(size.width * 0.8, size.height * 0.3),
17 Offset(size.width * 0.1, size.height * 0.7),
18 Offset(size.width * 0.7, size.height * 0.8),
19 Offset(size.width * 0.5, size.height * 0.5),
20 ];
21
22 final circleSizes = [
23 size.width * 0.3 * progress,
24 size.width * 0.2 * progress,
25 size.width * 0.25 * progress,
26 size.width * 0.15 * progress,
27 size.width * 0.4 * progress,
28 ];
29
30 for (int i = 0; i < circlePositions.length; i++) {
31 canvas.drawCircle(
32 circlePositions[i],
33 circleSizes[i],
34 paint,
35 );
36 }
37 }
38
39 @override
41 return oldDelegate.progress != progress;
42 }
43}
override bool shouldRepaint(SplashScreenCirclesPainter oldDelegate)
override void paint(Canvas canvas, Size size)
SplashScreenCirclesPainter({required this.progress})
final Color color