TextLayoutInput


The data class which holds the set of parameters of the text layout computation.

Summary

Public constructors

TextLayoutInput(
    text: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    maxLines: Int,
    softWrap: Boolean,
    overflow: TextOverflow,
    density: Density,
    layoutDirection: LayoutDirection,
    fontFamilyResolver: FontFamily.Resolver,
    constraints: Constraints
)
Cmn
TextLayoutInput(
    text: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    maxLines: Int,
    softWrap: Boolean,
    overflow: TextOverflow,
    density: Density,
    layoutDirection: LayoutDirection,
    resourceLoader: Font.ResourceLoader,
    constraints: Constraints
)

This function is deprecated. Font.ResourceLoader is replaced with FontFamily.Resolver

Cmn

Public functions

TextLayoutInput
copy(
    text: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    maxLines: Int,
    softWrap: Boolean,
    overflow: TextOverflow,
    density: Density,
    layoutDirection: LayoutDirection,
    resourceLoader: Font.ResourceLoader,
    constraints: Constraints
)

This function is deprecated. Font.ResourceLoader is deprecated

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

Constraints

The minimum width provided while calculating this text layout.

Cmn
Density

The density param used for computing this text layout.

Cmn
FontFamily.Resolver

The font resolver used for computing this text layout.

Cmn
LayoutDirection

The layout direction used for computing this text layout.

Cmn
Int

The maxLines param used for computing this text layout.

Cmn
TextOverflow

The overflow param used for computing this text layout

Cmn
List<AnnotatedString.Range<Placeholder>>

A list of Placeholders inserted into text layout that reserves space to embed icons or custom emojis.

Cmn
Font.ResourceLoader

This property is deprecated. Replaced with FontFamily.Resolver

Cmn
Boolean

The maxLines param used for computing this text layout.

Cmn
TextStyle

The text layout used for computing this text layout.

Cmn
AnnotatedString

The text used for computing text layout.

Cmn

Public constructors

TextLayoutInput

TextLayoutInput(
    text: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    maxLines: Int,
    softWrap: Boolean,
    overflow: TextOverflow,
    density: Density,
    layoutDirection: LayoutDirection,
    fontFamilyResolver: FontFamily.Resolver,
    constraints: Constraints
)

TextLayoutInput

TextLayoutInput(
    text: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    maxLines: Int,
    softWrap: Boolean,
    overflow: TextOverflow,
    density: Density,
    layoutDirection: LayoutDirection,
    resourceLoader: Font.ResourceLoader,
    constraints: Constraints
)

Public functions

copy

fun copy(
    text: AnnotatedString = this.text,
    style: TextStyle = this.style,
    placeholders: List<AnnotatedString.Range<Placeholder>> = this.placeholders,
    maxLines: Int = this.maxLines,
    softWrap: Boolean = this.softWrap,
    overflow: TextOverflow = this.overflow,
    density: Density = this.density,
    layoutDirection: LayoutDirection = this.layoutDirection,
    resourceLoader: Font.ResourceLoader = this.resourceLoader,
    constraints: Constraints = this.constraints
): TextLayoutInput

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

constraints

val constraintsConstraints

The minimum width provided while calculating this text layout.

density

val densityDensity

The density param used for computing this text layout.

fontFamilyResolver

val fontFamilyResolverFontFamily.Resolver

The font resolver used for computing this text layout.

layoutDirection

val layoutDirectionLayoutDirection

The layout direction used for computing this text layout.

maxLines

val maxLinesInt

The maxLines param used for computing this text layout.

overflow

val overflowTextOverflow

The overflow param used for computing this text layout

placeholders

val placeholdersList<AnnotatedString.Range<Placeholder>>

A list of Placeholders inserted into text layout that reserves space to embed icons or custom emojis. A list of bounding boxes will be returned in TextLayoutResult.placeholderRects that corresponds to this input.

resourceLoader

val resourceLoaderFont.ResourceLoader

softWrap

val softWrapBoolean

The maxLines param used for computing this text layout.

style

val styleTextStyle

The text layout used for computing this text layout.

text

val textAnnotatedString

The text used for computing text layout.