boustro library

Classes

AnimatedBoustroComponentConfig
Animated version of BoustroComponentConfig which automatically transitions the colors, etc, over a given duration whenever the given theme changes.
AnimatedBoustroTheme
Animated version of BoustroTheme which automatically transitions the colors, etc, over a given duration whenever the given theme changes.
AttributeGestureMapper
An opaque object, used to manage the lifetimes of GestureRecognizers.
AttributeSegment
A range of the source text with the set of attributes that are applied to it.
AttributeSpan
A TextAttribute applied to a range of text.
AttributeTheme
Theming for TextAttribute.
AttributeThemeBuilder
Builder for AttributeThemeData.
AttributeThemeData
Map of properties that can be used to theme TextAttribute. Data class for AttributeTheme.
AutoFormatter
Widget that automatically applies TextAttributes to a DocumentController based on FormatRules.
AutoFormatTextAttribute
Attribute used by AutoFormatter.
BoustroComponentConfig
Theme for custom components in boustro, like embeds and line modifiers.
BoustroComponentConfigBuilder
Builder for BoustroComponentConfigData.
BoustroComponentConfigData
Theme data object for BoustroComponentConfig.
BoustroComponentThemeDataTween
An interpolation between two BoustroThemeDatas.
BoustroConfig
Encapsulates boustro configuration.
BoustroScope
Inherited widget that carries information about a document.
BoustroTheme
Provides theming for boustro widgets.
BoustroThemeData
Contains data for BoustroTheme.
BoustroThemeDataTween
An interpolation between two BoustroThemeDatas.
ColorThemeProperty
ThemeProperty implementation for Color values.
CommonPatterns
Commonly used regex patterns. Useful as patterns for FormatRule.
Document
Rich text represented as a list of Paragraphs.
DocumentBuilder
Builds a Document. Can be used fluently with cascades.
DocumentController
Manages the contents of a DocumentEditor.
DocumentEditor
An editor for a Document. Uses a DocumentController to manage its state.
DocumentView
A readonly view of a Document.
DoubleThemeProperty
ThemeProperty implementation for double values.
EdgeInsetsThemeProperty
ThemeProperty implementation for EdgeInsets values.
EmbedState
Holds FocusNode and content for an embed.
FormatRule
Rule that applies a TextAttribute to text that matches a regex. Used by AutoFormatter.
FormatRuleset
A collection of FormatRules that can be applied to a SpannedString using applyToString.
LineModifier
Wraps a line to modify how it's displayed.
LineModifierController
Manages a list of LineModifier and notifies whenever the list changes.
LineParagraph
Immutable representation of a line of rich text in a Document.
LineParagraphView
A widget that displays a line LineParagraph.
LineState
Holds focus node and state for a line of text.
LineValueChangedEvent
Event data for DocumentController.onLineValueChanged.
Paragraph
A paragraph in a Document. Is either a LineParagraph for rich text, or a ParagraphEmbed for other content.
ParagraphEmbed
Base class for paragraph embeds.
ParagraphEmbedController
Interface for controller of a ParagraphEmbed.
ParagraphEmbedView
A widget that displays an embed.
ParagraphEvent
Event data for DocumentController.onParagraphAdded and DocumentController.onParagraphRemoved.
ParagraphState
Holds state for a paragraph of a document.
ParagraphView
Widget that displays a Paragraph.
Range
A range with a start and end index.
SpanExpandRules
Contains an ExpandRule for the start and end boundaries of a span.
SpanList
Manages AttributeSpans apart from the text to which they are to be applied.
SpannedString
Rich text represented with a String and a SpanList.
SpannedStringBuilder
Builds a SpannedString. Can be used fluently with cascades.
SpannedTextEditingController
A TextEditingController with rich text capabilities.
StringDiff
Result of SpannedTextEditingController.diffStrings.
TextAttribute
An attribute to apply to a span of text.
TextAttributeValue
Style and gesture handlers that can be applied to a TextSpan.
TextStyleThemeProperty
ThemeProperty implementation for TextStyle values.
ThemedTextAttribute
Base class for TextAttribute implementations that need an AttributeTheme to resolve their theme.
ThemeProperty<T>
A custom themeable property for user-provided embeds and line modifiers.
Toolbar
A horizontal bar that displays buttons to interact with a DocumentController.
ToolbarItem
Item in a Toolbar.
UneditableEmbed
Base class for embeds that cannot be edited.
UnlerpableThemeProperty<T>
ThemeProperty implementation for values that cannot be interpolated.

Enums

ExpandRule
Determines if a span expands when AttributeSpan.shift is called at its boundaries.
OverrideType
Passed to SpannedTextEditingController.setOverride to indicate if a TextAttribute should be applied or removed.

Extensions

AttributeSegmentsExtensions on Iterable<AttributeSegment>
Implements buildTextSpan for attribute segments.
ExpandRuleExtension on ExpandRule
Extensions for SpanAttachment.
LineModifierX on Iterable<LineModifier>
Extension method to apply line modifiers to a widget.
SpannedTextEditingControllerExtension on SpannedTextEditingController
High-level convenience methods for SpannedTextEditingController.

Constants

maxSpanLength → const int
Maximum length of a span.

Typedefs

CustomToolbarItemBuilder = Widget Function(BuildContext context, DocumentController controller)
Builds a widget given a BuildContext and a DocumentController. Used in ToolbarItem.custom.
MatchToAttribute = TextAttribute Function(RegExpMatch)
Signature for function that creates or gets a TextAttribute for a given RegExpMatch. Used by FormatRule.
ProcessTextValue = TextEditingValue Function(SpannedTextEditingController, TextEditingValue)
Used by SpannedTextEditingController to process SpannedTextEditingController.value whenever it changes.
ToolbarItemBuilder = Widget Function(BuildContext context, DocumentController controller, ToolbarItem item)
Builds a toolbar item into a widget.
ToolbarItemCallback = void Function(BuildContext context, DocumentController controller)
Called when a toolbar item is pressed.