drawSelectionBand function
A translucent drag range-selection band over rect.
Implementation
void drawSelectionBand(
Canvas canvas,
Rect rect, {
required Color fill,
required Color border,
}) {
if (rect.width <= 0 || rect.height <= 0) return;
canvas
..drawRect(rect, Paint()..color = fill)
..drawRect(
rect,
Paint()
..color = border
..style = PaintingStyle.stroke
..strokeWidth = 1,
);
}