layOutNextLine abstract method

InlineTextElement? layOutNextLine(
  1. double availableWidth, {
  2. required bool isStartOfLine,
  3. double trailingWidth = 0,
})

Lays out as much of the remaining content as fits in availableWidth, or returns null if not even its first word fits.

If the returned piece reaches the end of the content and the content does not end with whitespace, the piece is glued to whatever follows it, so it must also leave trailingWidth of space for that. At the start of a line a run that cannot fit anyway is laid out ignoring trailingWidth, so that layout can still make progress.

Implementation

InlineTextElement? layOutNextLine(
  double availableWidth, {
  required bool isStartOfLine,
  double trailingWidth = 0,
});