TextStyle
class TextStyle
Description of a text style for the Text composable.
Summary
Public constructors |
|---|
TextStyle( |
Public functions |
|
|---|---|
TextStyle |
copy( |
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
Public properties |
|
|---|---|
ColorProvider |
optionally specifies the color to use for the text, defaults to |
FontFamily? |
optionally specifies which font family to use for the text, defaults to system when null. |
TextUnit? |
optionally specifies the size to use for the text, defaults to system when null. |
FontStyle? |
optionally specifies style (such as italics) to use for the text, defaults to system when null. |
FontWeight? |
optionally specifies the weight to use for the text, defaults to system when null. |
TextAlign? |
optionally specifies the alignment to use for the text, defaults to start when. null. |
TextDecoration? |
optionally specifies decorations (e.g. underline) to use for the text, defaults to none when null |
Public constructors
TextStyle
TextStyle(
color: ColorProvider = TextDefaults.defaultTextColor,
fontSize: TextUnit? = null,
fontWeight: FontWeight? = null,
fontStyle: FontStyle? = null,
textAlign: TextAlign? = null,
textDecoration: TextDecoration? = null,
fontFamily: FontFamily? = null
)
| Parameters | |
|---|---|
color: ColorProvider = TextDefaults.defaultTextColor |
optionally specifies the color to use for the text, defaults to |
fontSize: TextUnit? = null |
optionally specifies the size to use for the text, defaults to system when null. |
fontWeight: FontWeight? = null |
optionally specifies the weight to use for the text, defaults to system when null. |
fontStyle: FontStyle? = null |
optionally specifies style (such as italics) to use for the text, defaults to system when null. |
textAlign: TextAlign? = null |
optionally specifies the alignment to use for the text, defaults to start when. null. |
textDecoration: TextDecoration? = null |
optionally specifies decorations (e.g. underline) to use for the text, defaults to none when null |
fontFamily: FontFamily? = null |
optionally specifies which font family to use for the text, defaults to system when null. |
Public functions
copy
fun copy(
color: ColorProvider = this.color,
fontSize: TextUnit? = this.fontSize,
fontWeight: FontWeight? = this.fontWeight,
fontStyle: FontStyle? = this.fontStyle,
textAlign: TextAlign? = this.textAlign,
textDecoration: TextDecoration? = this.textDecoration,
fontFamily: FontFamily? = this.fontFamily
): TextStyle
Public properties
color
val color: ColorProvider
optionally specifies the color to use for the text, defaults to TextDefaults.defaultTextColor.
fontFamily
val fontFamily: FontFamily?
optionally specifies which font family to use for the text, defaults to system when null.
fontSize
val fontSize: TextUnit?
optionally specifies the size to use for the text, defaults to system when null.
fontStyle
val fontStyle: FontStyle?
optionally specifies style (such as italics) to use for the text, defaults to system when null.
fontWeight
val fontWeight: FontWeight?
optionally specifies the weight to use for the text, defaults to system when null.
textAlign
val textAlign: TextAlign?
optionally specifies the alignment to use for the text, defaults to start when. null.
textDecoration
val textDecoration: TextDecoration?
optionally specifies decorations (e.g. underline) to use for the text, defaults to none when null