isApplied method

bool isApplied(
  1. TextAttribute attribute,
  2. Range range
)

If range is not collapsed, returns true if attribute is applied to the full range of text.

If range is collapsed, returns the result of willApply for attribute.

Implementation

bool isApplied(TextAttribute attribute, Range range) {
  return getSpansIn(range, attribute).any(
    (s) => s.isApplied(range),
  );
}