FormatRuleset class
A collection of FormatRules that can be applied to a SpannedString using applyToString.
For automatic formatting see AutoFormatter.
Attributes applied with a format ruleset are wrapped in an AutoFormatTextAttribute. When serializing, make sure to delete or transform these attributes, or provide a serializer for them.
Constructors
-
FormatRuleset(List<
FormatRule> rules) -
Create a format ruleset.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
rules
→ List<
FormatRule> -
Rules for formatting.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyToDocument(
Document document, {bool clearPrevious = true}) → Document - Apply this ruleset to the given document and return the result.
-
applyToString(
SpannedString source, {bool clearPrevious = true}) → SpanList -
Apply the formatting rules to
source
and return the resulting SpanList. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited