ExercisePosePainterWidget constructor

ExercisePosePainterWidget({
  1. required List<Pose> poses,
  2. required CameraDirection cameraDirection,
  3. required Size widgetSize,
  4. required Size imageSize,
  5. required Exercise exercise,
  6. required ExerciseRepetitionCounterService exerciseRepetitionCounterService,
  7. bool startExerciseRepsCounting = false,
  8. bool resetExerciseRepsCounting = false,
  9. bool showKeypointCircles = true,
  10. KeyPointsCircleStyle keyPointsCircleStyle = keyPointsDefaultCircleStyle,
  11. bool showKeypointLines = true,
  12. KeyPointsLineStyle keyPointsLineStyle = keyPointsDefaultLineStyle,
  13. bool showAnglesText = true,
  14. TextStyle anglesTextStyle = angleDefaultTextStyle,
  15. void onRepetitionCount(
    1. int reps
    )?,
})

Implementation

ExercisePosePainterWidget({
  required this.poses,
  required this.cameraDirection,
  required this.widgetSize,
  required this.imageSize,
  required this.exercise,
  required this.exerciseRepetitionCounterService,
  this.startExerciseRepsCounting = false,
  this.resetExerciseRepsCounting = false,
  this.showKeypointCircles = true,
  this.keyPointsCircleStyle = keyPointsDefaultCircleStyle,
  this.showKeypointLines = true,
  this.keyPointsLineStyle = keyPointsDefaultLineStyle,
  this.showAnglesText = true,
  this.anglesTextStyle = angleDefaultTextStyle,
  this.onRepetitionCount,
}) {
  keypointPaint = Paint()
  ..color = keyPointsCircleStyle.color
  ..style = PaintingStyle.fill;

  linePaint = Paint()
  ..color = keyPointsLineStyle.color
  ..style = PaintingStyle.stroke
  ..strokeWidth = keyPointsLineStyle.strokeWidth;
}