ExercisePosePainterWidget constructor
ExercisePosePainterWidget({
- required List<
Pose> poses, - required CameraDirection cameraDirection,
- required Size widgetSize,
- required Size imageSize,
- required Exercise exercise,
- required ExerciseRepetitionCounterService exerciseRepetitionCounterService,
- bool startExerciseRepsCounting = false,
- bool resetExerciseRepsCounting = false,
- bool showKeypointCircles = true,
- KeyPointsCircleStyle keyPointsCircleStyle = keyPointsDefaultCircleStyle,
- bool showKeypointLines = true,
- KeyPointsLineStyle keyPointsLineStyle = keyPointsDefaultLineStyle,
- bool showAnglesText = true,
- TextStyle anglesTextStyle = angleDefaultTextStyle,
- void onRepetitionCount(
- 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;
}