TextHighlight constructor

const TextHighlight({
  1. required int start,
  2. required int end,
  3. Color? foregroundColor,
  4. Color? backgroundColor,
})

Defines an ordered half-open UTF-16 source span with optional color overrides.

Implementation

const TextHighlight({
  required this.start,
  required this.end,
  this.foregroundColor,
  this.backgroundColor,
}) : assert(start >= 0 && end >= start, 'Invalid selection range');