LinkBuildDetails class final
What the link builder is told about one [label](url) or autolink.
- Inheritance
-
- Object
- InlineBuildDetails
- LinkBuildDetails
Constructors
-
LinkBuildDetails({required BuildContext context, required GptMarkdownConfig config, required TextStyle style, required String url, required String label, required LinkStyle linkStyle, List<
InlineSpan> labelSpans = const <InlineSpan>[], bool isAutolink = false, VoidCallback? onTap}) -
Creates link details.
const
Properties
- config → GptMarkdownConfig
-
The configuration in force at this point in the document.
finalinherited
- context → BuildContext
-
The element this construct is being built in.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverStyle → TextStyle
-
style recoloured with LinkStyle.hoverColor, for
TappableTextSpan.hoverStyle.
no setter
- isAutolink → bool
-
Whether the package found this as a bare URL rather than as
[…](…).final - label → String
-
The label as plain text.
final
-
labelSpans
→ List<
InlineSpan> -
The label, already parsed and styled with style.
final
- linkStyle → LinkStyle
-
The resolved LinkStyle — colour, hover colour, decoration, thickness
and weight, with GptMarkdownTheme fallbacks already applied.
final
- onTap → VoidCallback?
-
Invokes GptMarkdownConfig.onLinkTap for this link, or null when no
handler is set.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → TextStyle
-
The text style in effect for this construct, fully resolved.
finalinherited
- url → String
-
The link target, verbatim from the document —
/docs/a,https://x.dev,mailto:a@b.c. Never resolved or normalised.final
Methods
-
asWidgetSpan(
Widget child, {PlaceholderAlignment alignment = PlaceholderAlignment.baseline, TextBaseline? baseline = TextBaseline.alphabetic}) → InlineSpan -
childin a placeholder wrapped exactly the way the deprecated LinkBuilder's result is, with onTap attached. -
defaultSpan(
{TextStyle? style, List< InlineSpan> ? children}) → InlineSpan - Exactly what a link renders as when no builder is given.
-
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