applyRule method

  1. @override
Delta applyRule(
  1. Delta document,
  2. int index, {
  3. int? len,
  4. Object? data,
  5. Attribute? attribute,
})
override

Applies heuristic rule to an operation on a document and returns resulting Delta.

Implementation

@override
Delta applyRule(Delta document, int index, {int? len, Object? data, Attribute? attribute}) {
  return Delta()
    ..retain(index + (len ?? 0))
    ..insert(data);
}