AttributeSpan constructor

const AttributeSpan(
  1. TextAttribute attribute,
  2. int start,
  3. int end
)

Create an attribute span.

range must be valid, normalized and not collapsed.

Implementation

const AttributeSpan(
  this.attribute,
  this.start,
  this.end,
)   : assert(start >= 0 && end >= 0, 'Range must be valid.'),
      assert(
          start < end, 'Range must be normalized and may not be collapsed.');