defaultFormatter
fun defaultFormatter(autoTranslationEnabled: Boolean, isInDarkMode: Boolean = isSystemInDarkTheme(), typography: StreamTypography = StreamTypography.defaultTypography(), colors: StreamColors = when (isSystemInDarkTheme()) {
true -> StreamColors.defaultDarkColors()
else -> StreamColors.defaultColors()
}, textStyle: (isMine: Boolean) -> TextStyle = defaultTextStyle(isInDarkMode, typography, colors), builder: AnnotatedMessageTextBuilder? = null): MessageTextFormatter
Builds the default message text formatter.
Return
The default implementation of MessageTextFormatter.
Parameters
autoTranslationEnabled
Whether the auto-translation is enabled.
isInDarkMode
Whether the app is in dark mode.
typography
The typography to use for styling.
colors
The colors to use for styling.
textStyle
The text style to use for styling.
builder
The builder to use for customizing the text.
See also
fun defaultFormatter(autoTranslationEnabled: Boolean, isInDarkMode: Boolean = isSystemInDarkTheme(), typography: StreamTypography = StreamTypography.defaultTypography(), shapes: StreamShapes = StreamShapes.defaultShapes(), colors: StreamColors = when (isSystemInDarkTheme()) {
true -> StreamColors.defaultDarkColors()
else -> StreamColors.defaultColors()
}, ownMessageTheme: MessageTheme = MessageTheme.defaultOwnTheme(
isInDarkMode = isInDarkMode,
typography = typography,
shapes = shapes,
colors = colors,
), otherMessageTheme: MessageTheme = MessageTheme.defaultOtherTheme(
isInDarkMode = isInDarkMode,
typography = typography,
shapes = shapes,
colors = colors,
), builder: AnnotatedMessageTextBuilder? = null): MessageTextFormatter
Builds the default message text formatter.
Return
The default implementation of MessageTextFormatter.
Parameters
autoTranslationEnabled
Whether the auto-translation is enabled.
typography
The typography to use for styling.
colors
The colors to use for styling.
ownMessageTheme
The theme to use for the current user's messages.
otherMessageTheme
The theme to use for other users' messages.
builder
The builder to use for customizing the text.