TagflowOptions class final

Legacy compatibility wrapper for runtime view options.

Prefer TagflowViewOptions for new code, and pass TagflowRenderBoundary to Tagflow.html(renderBoundary: ...) or the HTML adapter. Kept unchanged through 1.x and removed in tagflow 2.0.

Annotations
  • @Deprecated('Use TagflowViewOptions (viewOptions:) and Tagflow.html(renderBoundary: ...) ' 'instead. Will be removed in tagflow 2.0.')

Constructors

TagflowOptions({bool debug = false, TagflowLinkTapCallback? linkTapCallback, TagflowNodeTapCallback? nodeTapCallback, Set<TagflowNodeKind> tapTargetKinds = const {}, TagflowSelectableOptions selectable = const TagflowSelectableOptions(), ImageLoadingBuilder? imageLoadingBuilder, ImageErrorWidgetBuilder? imageErrorBuilder, double? maxImageWidth, double? maxImageHeight, @Deprecated('Has no effect: images use the Flutter image cache. ' 'Will be removed before tagflow 1.0.0.') bool enableImageCache = true, TagflowErrorWidgetBuilder? errorBuilder, TagflowCodeBlockOptions codeBlock = const TagflowCodeBlockOptions(), TagflowRenderBoundary? renderBoundary})
Creates a new TagflowOptions instance.
const
TagflowOptions.fromViewOptions(TagflowViewOptions options, {TagflowRenderBoundary? renderBoundary})
Creates legacy options from the new runtime view options.
factory

Properties

codeBlock → TagflowCodeBlockOptions
Options for code block highlighting and the copy button.
final
debug → bool
Enable debug mode
final
enableImageCache → bool
Has no effect; images always use the Flutter image cache.
final
errorBuilder → TagflowErrorWidgetBuilder?
Custom widget builder for unrecoverable parsing or rendering errors.
final
hashCode → int
The hash code for this object.
no setterinherited
imageErrorBuilder → ImageErrorWidgetBuilder?
Custom image error widget builder
final
imageLoadingBuilder → ImageLoadingBuilder?
Custom image loading widget builder
final
linkTapCallback → TagflowLinkTapCallback?
Callback for handling link taps
final
maxImageHeight → double?
Maximum height for images
final
maxImageWidth → double?
Maximum width for images
final
nodeTapCallback → TagflowNodeTapCallback?
Callback for taps on opted-in semantic node kinds.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
renderBoundary → TagflowRenderBoundary?
Optional boundary that stops rendering part-way through the HTML tree.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectable → TagflowSelectableOptions
Options for configuring the selectable behavior
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
tapTargetKinds → Set<TagflowNodeKind>
Semantic node kinds that should be wrapped as tap targets.
final

Methods

copyWith({bool? debug, TagflowLinkTapCallback? linkTapCallback, TagflowNodeTapCallback? nodeTapCallback, Set<TagflowNodeKind>? tapTargetKinds, TagflowSelectableOptions? selectable, ImageLoadingBuilder? imageLoadingBuilder, ImageErrorWidgetBuilder? imageErrorBuilder, double? maxImageWidth, double? maxImageHeight, bool? enableImageCache, TagflowErrorWidgetBuilder? errorBuilder, TagflowCodeBlockOptions? codeBlock, TagflowRenderBoundary? renderBoundary}) → TagflowOptions
Create a copy with some properties replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toViewOptions() → TagflowViewOptions
Converts these compatibility options into the runtime view options.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

maybeOf(BuildContext context) → TagflowOptions?
Get options from context if available
of(BuildContext context) → TagflowOptions
Get options from context

Constants

defaults → const TagflowOptions
Default options