InlineFlow class
A block's lines: one CSS inline formatting context (CSS 2.1 9.4.2, 10.8; css-text-3), laid out and painted by this render object alone.
A Text is one paragraph broken by Skia, standing every run on one
baseline under one strut, and a placeholder is one unbreakable piece. It
cannot say what a browser does with an inline box a line breaks INSIDE:
vertical-align moving each of the box's pieces by what is on ITS line,
the box's background and border drawn round each piece, text that
white-space keeps or a word break that differs from run to run. This
lays the content out the way CSS does:
- the content is flattened into words, spaces, box edges and atomic
inlines; white space is collapsed or kept by each run's
white-space(css-text-3 4.1); - lines are broken at soft wrap opportunities -- spaces, after a hyphen, between ideographs, never before a closing glyph nor after an opening one -- measuring each run on a line whole, as the browser shapes it (css-text-3 5);
- each line's height and baseline are settled by
vertical-align(10.8): the font is the strut, every inline box aligned by what it holds on that line; - each line is placed by
text-alignand textIndent, its items in visual order (UAX #9: over whole items left to right; right to left, over the paragraph's characters, a word split where their levels part, and each inline box's start edge on its right); - each inline box is one fragment on each line it is on;
- with ellipsis, a line too wide for the flow ends on an ellipsis;
- with textWrap, the lines are re-broken to balance, or for a last line of one short word.
Painted in CSS's order (appendix E): line by line, each inline box's frame before what it holds on that line; a faded box (InlineBox.opacity), a stacking context, after all of that, as one picture at its alpha, and a moved one (InlineBox.offset) there too.
The text scales for the reader as a Text's does (textScaler), its struts and fonts with it -- and only the text: an InlineAtom is laid out at its own size, unlike a RichText's WidgetSpan.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- InlineFlow
Constructors
-
InlineFlow({Key? key, required InlineFont font, TextStyle? style, TextAlign textAlign = TextAlign.start, double textIndent = 0, double tabSize = 8, WhiteSpace whiteSpace = WhiteSpace.normal, WordBreak wordBreak = WordBreak.normal, OverflowWrap overflowWrap = OverflowWrap.normal, TextDirection? textDirection, bool ellipsis = false, String ellipsisText = '\u2026', TextWrapStyle textWrap = TextWrapStyle.auto, TextScaler? textScaler, List<
InlineNode> children = const []}) -
const
Properties
-
children
→ List<
InlineNode> -
final
- ellipsis → bool
-
text-overflow: ellipsison a block that hides its overflow (css-overflow-3 3.2): each line too wide for the flow ends on….final - ellipsisText → String
-
What the ellipsis is written as:
…, or three full stops where the block's primary face has no…-- Blink asks that face alone (NGLineTruncator), and sets the full stops in whatever face draws them.final - font → InlineFont
-
The block's font: the strut every line stands on.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- overflowWrap → OverflowWrap
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → TextStyle?
-
Merged over the ambient DefaultTextStyle; the runs' own styles are
merged over it.
final
- tabSize → double
-
tab-size, in spaces of style: a kept tab stops at the next multiple of it from the line's start.final - textAlign → TextAlign
-
final
- textDirection → TextDirection?
-
The paragraph's direction; null is the ambient Directionality.
final
- textIndent → double
-
text-indent, on the first line.final - textScaler → TextScaler?
-
How the flow's TEXT is scaled for the reader (
MediaQuery's text scale, an accessibility setting); null is the ambient MediaQuery.textScalerOf, as a Text's is. TextScaler.noScaling keeps every length as written, as a layout of fixed pixel metrics needs.final - textWrap → TextWrapStyle
-
text-wrap-style(css-text-4 6.2), as Blink'sScoreLineBreakersets it: TextWrapStyle.balance re-breaks a paragraph of up to six lines, and TextWrapStyle.pretty the last four lines of one whose last line is a single word under a third of the room, each for the least room left over, squared (see_rebroken). The widths scored are the flow's own -- its runs measured whole, the frames and atomic inlines on the line -- save that a line does not count the box edges after its last word. Only the breaks move: the flow has the greedy number of lines, and its min- and max-content widths are the greedy ones. A forced break ends a paragraph, each scored on its own -- balanced lines in the first alone, as Blink balances. A flow with a tab, and a paragraph with a line wider than the flow, is broken greedily.final - whiteSpace → WhiteSpace
-
final
- wordBreak → WordBreak
-
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
-
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