paint method

  1. @override
void paint(
  1. PaintingContext context,
  2. Offset offset
)
override

Paints this render object into the given context at offset.

Implementation

@override
void paint(PaintingContext context, Offset offset) {
  _ensureStylesCached();
  final int w = size!.width;
  final int trackWidth = _trackWidth(w);
  final int thumbPos = _thumbPosition(trackWidth);
  _paintTrack(context, offset.x, offset.y, trackWidth, thumbPos);
  if (label != null && label!.isNotEmpty) {
    _paintLabel(context, offset.x + trackWidth + 2, offset.y);
  }
}