SpannedTextEditingControllerExtension extension

High-level convenience methods for SpannedTextEditingController.

on

Methods

applyAttribute(TextAttribute attribute) → void
Apply an attribute to the current selection.
getAppliedSpansWithType<T extends TextAttribute>() Iterable<AttributeSpan>
Get all attribute spans of type T applied to the current selection.
getAppliedSpansWithUnsafeType(Type type) Iterable<AttributeSpan>
Get all attribute spans of type type applied to the current selection.
isApplied(TextAttribute attribute) bool
Determines if attribute is applied to the full selection (for a ranged selection) or would be applied on insertion (for a collapsed selection).
toggleAttribute(TextAttribute attribute) bool
Toggle an attribute for the current selection.