SeoText class
A Flutter Text widget that can inject a corresponding HTML element for SEO when running on the web.
The HTML element is created according to the TextTag provided
(e.g., <h1>, <p>, <span>). This allows text content to
be discoverable and indexable by search engines.
- Inheritance
- Implemented types
Constructors
- SeoText(String text, {TextTag tag = TextTag.p, String? id, Key? key, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, TextScaler? textScaler, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, Color? selectionColor, void onTap()?})
-
Creates a SeoText widget.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
Optional HTML id for the element.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale?
-
Locale for the text.
final
- maxLines → int?
-
Maximum number of lines for the text.
final
- onTap → void Function()?
-
Optional callback triggered when the link is tapped in Flutter.
final
- overflow → TextOverflow?
-
Overflow behavior for the text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
Color used when selecting text.
final
- semanticsLabel → String?
-
Semantics label for accessibility.
final
- softWrap → bool?
-
Whether the text should break at soft line breaks.
final
- strutStyle → StrutStyle?
-
Strut style for consistent line height.
final
- style → TextStyle?
-
Flutter text styling.
final
- tag → TextTag
-
The HTML tag to use when injecting the text into the DOM.
final
- text → String
-
The text content to display.
final
- textAlign → TextAlign?
-
Text alignment.
final
- textDirection → TextDirection?
-
Text direction.
final
- textHeightBehavior → TextHeightBehavior?
-
Height behavior for the text.
final
- textScaler → TextScaler?
-
Text scaler for accessibility.
final
- textWidthBasis → TextWidthBasis?
-
Basis for computing the width of the text.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
createHtmlElement(
) → WebHTMLElement? -
Creates and returns a WebHTMLElement to represent this object in the DOM.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited