Skip to content

Commit

Permalink
Fix arm IK circle color on dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Sep 18, 2024
1 parent ec98372 commit d8eb847
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/src/pages/arm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ class ArmPainterTop extends CustomPainter {
class ArmPainterSide extends CustomPainter {
/// The view model to pull data from.
ArmModel model;

/// Color to paint the radius in
Color radiusColor;

/// Constructor for the ArmPainterSide, takes in 3 angles
ArmPainterSide(this.model);
ArmPainterSide(this.model, this.radiusColor);

/// The smaller screen dimension.
late double screen;
Expand Down Expand Up @@ -120,7 +123,7 @@ class ArmPainterSide extends CustomPainter {
paintArm(canvas, size, ikCoordinates, opacity: 0.5);
}
final radiusPaint = Paint()
..color = Colors.black
..color = radiusColor
..style = PaintingStyle.stroke
..strokeWidth = 2;
final radius1 = length * (shoulderLength + elbowLength);
Expand Down Expand Up @@ -252,7 +255,7 @@ class ArmPage extends ReactiveWidget<ArmModel> {
child: GestureDetector(
onTap: model.sendIK,
child: CustomPaint(
painter: ArmPainterSide(model),
painter: ArmPainterSide(model, context.colorScheme.onSurface),
),
),
),
Expand Down

0 comments on commit d8eb847

Please sign in to comment.