zefyrka library

Zefyr widgets and document model.

To use, import 'package:zefyrka/zefyrka.dart';.

Classes

AlignmentAttributeBuilder
Builder for paragraph alignment attribute styles.
AutoExitBlockRule
Heuristic rule to exit current block when user inserts two consecutive newlines.
AutoFormatLinksRule
Applies link format to text segment (which looks like a link) when user inserts space character after it.
BackgroundColorAttributeBuilder
Builder for background color attribute values.
BlockAttributeBuilder
Builder for block attribute styles (number/bullet lists, code and quote).
BlockEmbed
An object which occupies an entire line in a document and cannot co-exist inline with regular text.
BlockNode
A block represents a group of adjacent LineNodes with the same block style.
CatchAllDeleteRule
Fallback rule for delete operations which simply deletes specified text range without any special handling.
CatchAllInsertRule
Fallback rule which simply inserts text as-is without any special handling.
ClipboardController
ColorAttributeBuilder
Builder for color attribute values.
ContainerNode<T extends Node>
Container node can accommodate other nodes.
CursorController
Controls cursor of an editable widget.
CursorStyle
Style properties of editing cursor.
DeleteRule
A heuristic rule for delete operations.
EditorState
Base interface for the editor state which defines contract used by various mixins.
EmbeddableObject
An object which can be embedded into a Notus document.
EmbedNode
An embed node inside of a line in a Notus document.
EnsureEmbedLineRule
Prevents user from merging a line containing an embed with other lines.
FloatingCursorController
FontFamilyAttributeBuilder
Builder for font family attribute values.
FontSizeAttributeBuilder
Builder for font size attribute values.
ForceNewlineForInsertsAroundEmbedRule
Forces text inserted on the same line with an embed (before or after it) to be moved to a new line adjacent to the original line.
FormatLinkAtCaretPositionRule
Allows updating link format with collapsed selection.
FormatRule
A heuristic rule for format (retain) operations.
HeadingAttributeBuilder
Builder for heading attribute styles.
IndentAttributeBuilder
Builder for indent attribute values.
InsertEmbedButton
InsertEmbedsRule
Handles all format operations which manipulate embeds.
InsertRule
A heuristic rule for insert operations.
LeafNode
A leaf node in Notus document tree.
LineNode
A line of rich text in a Notus document.
LinkAttributeBuilder
Builder for link attribute values.
LinkStyleButton
Toolbar button for formatting text as a link.
LookupResult
Result of a child lookup in a ContainerNode.
Node
An abstract node in a document tree.
NotusAttribute<T>
Style attribute applicable to a segment of a Notus document.
NotusAttributeBuilder<T>
Builder for style attributes.
NotusAttributeKey<T>
Interface for objects which provide access to an attribute key.
NotusChange
Represents a change in a NotusDocument.
NotusDocument
A rich text document.
NotusHeuristics
Registry for insert, format and delete heuristic rules used by NotusDocument documents.
NotusStyle
Collection of style attributes.
PreserveBlockStyleOnInsertRule
Preserves block style when user inserts text containing newlines.
PreserveInlineStylesRule
Preserves inline styles when user inserts text inside formatted segment.
PreserveLineStyleOnMergeRule
Preserves line format when user deletes the line's newline character effectively merging it with the next line.
PreserveLineStyleOnSplitRule
Preserves line format when user splits the line into two.
RawEditor
RawEditorState
RenderAbstractEditor
Base interface for editable render objects.
RenderEditor
Displays a Notus document as a vertical list of document segments (lines and blocks).
ResetLineFormatOnNewLineRule
Resets format for a newly inserted line when insert occurred at the end of a line (right before a newline).
ResolveInlineFormatRule
Produces Delta with inline-level attributes applied too all characters except newlines.
ResolveLineFormatRule
Produces Delta with line-level attributes applied strictly to newline characters.
RootNode
Root node of document tree.
SelectHeadingStyleButton
Toolbar button which allows to apply heading style to a line of text in Zefyr editor.
SimpleClipboardController
SpanEmbed
An object which can be embedded on the same line (inline) with regular text.
StyledNode
An interface for document nodes with style.
StyledNodeMixin
Mixin used by nodes that wish to implement StyledNode interface.
TextBlockTheme
Style theme applied to a block of rich text, including single-line paragraphs.
TextLine
Line of text in Zefyr editor.
TextNode
A span of formatted text within a line in a Notus document.
ToggleStyleButton
Toolbar button which allows to toggle a style attribute on or off.
VerticalSpacing
Vertical spacing around a block of text.
ZDropdownButton<T>
ZefyrController
ZefyrEditor
Widget for editing rich text documents.
ZefyrField
ZefyrTheme
Applies a Zefyr editor theme to descendant widgets.
ZefyrThemeData
ZefyrToolbar
ZIconButton
Default icon button used in Zefyr editor toolbar.

Enums

ChangeSource
Source of a NotusChange.
NotusAttributeScope
Scope of a style attribute, defines context in which an attribute can be applied.

Constants

kToolbarHeight → const double

Functions

defaultToggleStyleButtonBuilder(BuildContext context, NotusAttribute attribute, IconData icon, bool isToggled, VoidCallback? onPressed) Widget
Default builder for toggle style buttons.
defaultZefyrEmbedBuilder(BuildContext context, EmbedNode node) Widget
Default implementation of a builder function for embeddable objects in Zefyr.

Typedefs

TextSelectionChangedHandler = void Function(TextSelection selection, SelectionChangedCause cause)
Signature for the callback that reports when the user changes the selection (including the cursor location).
ToggleStyleButtonBuilder = Widget Function(BuildContext context, NotusAttribute attribute, IconData icon, bool isToggled, VoidCallback? onPressed)
Builder for toolbar buttons handling toggleable style attributes.
ZefyrEmbedBuilder = Widget Function(BuildContext context, EmbedNode node)
Builder function for embeddable objects in ZefyrEditor.