StreamMessageAnnotationStyle.from constructor
StreamMessageAnnotationStyle.from({})
A convenience constructor that constructs a StreamMessageAnnotationStyle given simple values.
All parameters default to null. By default this constructor returns a StreamMessageAnnotationStyle that doesn't override anything.
For example, to override the default annotation text and icon colors, one could write:
StreamMessageAnnotationStyle.from(
textColor: Colors.purple,
iconColor: Colors.purple,
)
Implementation
factory StreamMessageAnnotationStyle.from({
TextStyle? textStyle,
Color? textColor,
Color? iconColor,
double? iconSize,
double? spacing,
EdgeInsetsGeometry? padding,
TextStyle? trailingTextStyle,
Color? trailingTextColor,
}) {
return StreamMessageAnnotationStyle(
textStyle: textStyle?.let(StreamMessageLayoutProperty.all),
textColor: textColor?.let(StreamMessageLayoutProperty.all),
iconColor: iconColor?.let(StreamMessageLayoutProperty.all),
iconSize: iconSize?.let(StreamMessageLayoutProperty.all),
spacing: spacing?.let(StreamMessageLayoutProperty.all),
padding: padding?.let(StreamMessageLayoutProperty.all),
trailingTextStyle: trailingTextStyle?.let(StreamMessageLayoutProperty.all),
trailingTextColor: trailingTextColor?.let(StreamMessageLayoutProperty.all),
);
}