addLabel abstract method

void addLabel(
  1. String text,
  2. double x,
  3. double y,
  4. Color color, {
  5. double? fontSize,
  6. double rotation = 0.0,
})

Adds a label to be rendered on top of the scene. Coordinates are in transformed screen space (pixels) where origin is the center of canvas. rotation is an optional clockwise rotation in radians to rotate the text (useful for drawing labels parallel to lines).

Implementation

void addLabel(
  String text,
  double x,
  double y,
  Color color, {
  double? fontSize,
  double rotation = 0.0,
});