mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -44,6 +44,7 @@ class ActionItem extends StatelessWidget {
|
||||
);
|
||||
|
||||
if (animation != null) {
|
||||
final primary = theme.colorScheme.primary;
|
||||
child = Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.center,
|
||||
@@ -53,7 +54,7 @@ class ActionItem extends StatelessWidget {
|
||||
builder: (context, child) => CustomPaint(
|
||||
size: const Size.square(28),
|
||||
painter: _ArcPainter(
|
||||
color: theme.colorScheme.primary,
|
||||
color: primary,
|
||||
sweepAngle: animation!.value,
|
||||
),
|
||||
),
|
||||
@@ -117,6 +118,10 @@ class _ArcPainter extends CustomPainter {
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
if (sweepAngle == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
final paint = Paint()
|
||||
..color = color
|
||||
..strokeWidth = 2
|
||||
|
||||
Reference in New Issue
Block a user