chore(llc): rename theme property
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -75,7 +75,7 @@ class MyApp extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
ownMessageTheme: const StreamMessageThemeData(
|
||||
urlLinkTitleMaxLine: 1,
|
||||
urlAttachmentTitleMaxLine: 1,
|
||||
),
|
||||
otherMessageTheme: StreamMessageThemeData(
|
||||
messageBackgroundColor: colorTheme.textHighEmphasis,
|
||||
@@ -85,7 +85,7 @@ class MyApp extends StatelessWidget {
|
||||
avatarTheme: StreamAvatarThemeData(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
urlLinkTitleMaxLine: 1,
|
||||
urlAttachmentTitleMaxLine: 1,
|
||||
),
|
||||
).merge(defaultTheme);
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ class StreamUrlAttachment extends StatelessWidget {
|
||||
if (urlAttachment.title != null)
|
||||
Text(
|
||||
urlAttachment.title!.trim(),
|
||||
maxLines: messageTheme.urlLinkTitleMaxLine ?? 1,
|
||||
maxLines: messageTheme.urlAttachmentTitleMaxLine ?? 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: chatThemeData.textTheme.body
|
||||
.copyWith(fontWeight: FontWeight.w700),
|
||||
|
||||
@@ -21,7 +21,7 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
this.avatarTheme,
|
||||
this.createdAtStyle,
|
||||
this.linkBackgroundColor,
|
||||
this.urlLinkTitleMaxLine,
|
||||
this.urlAttachmentTitleMaxLine,
|
||||
});
|
||||
|
||||
/// Text style for message text
|
||||
@@ -61,7 +61,7 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
final Color? linkBackgroundColor;
|
||||
|
||||
/// Max number of lines in Url link title
|
||||
final int? urlLinkTitleMaxLine;
|
||||
final int? urlAttachmentTitleMaxLine;
|
||||
|
||||
/// Copy with a theme
|
||||
StreamMessageThemeData copyWith({
|
||||
@@ -94,7 +94,8 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
reactionsBorderColor: reactionsBorderColor ?? this.reactionsBorderColor,
|
||||
reactionsMaskColor: reactionsMaskColor ?? this.reactionsMaskColor,
|
||||
linkBackgroundColor: linkBackgroundColor ?? this.linkBackgroundColor,
|
||||
urlLinkTitleMaxLine: urlLinkTitleMaxLine ?? this.urlLinkTitleMaxLine,
|
||||
urlAttachmentTitleMaxLine:
|
||||
urlLinkTitleMaxLine ?? this.urlAttachmentTitleMaxLine,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -154,7 +155,7 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
reactionsBorderColor: other.reactionsBorderColor,
|
||||
reactionsMaskColor: other.reactionsMaskColor,
|
||||
linkBackgroundColor: other.linkBackgroundColor,
|
||||
urlLinkTitleMaxLine: other.urlLinkTitleMaxLine,
|
||||
urlLinkTitleMaxLine: other.urlAttachmentTitleMaxLine,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -175,7 +176,7 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
reactionsMaskColor == other.reactionsMaskColor &&
|
||||
avatarTheme == other.avatarTheme &&
|
||||
linkBackgroundColor == other.linkBackgroundColor &&
|
||||
urlLinkTitleMaxLine == other.urlLinkTitleMaxLine;
|
||||
urlAttachmentTitleMaxLine == other.urlAttachmentTitleMaxLine;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@@ -191,7 +192,7 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
reactionsMaskColor.hashCode ^
|
||||
avatarTheme.hashCode ^
|
||||
linkBackgroundColor.hashCode ^
|
||||
urlLinkTitleMaxLine.hashCode;
|
||||
urlAttachmentTitleMaxLine.hashCode;
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
@@ -209,6 +210,9 @@ class StreamMessageThemeData with Diagnosticable {
|
||||
..add(ColorProperty('reactionsBorderColor', reactionsBorderColor))
|
||||
..add(ColorProperty('reactionsMaskColor', reactionsMaskColor))
|
||||
..add(ColorProperty('linkBackgroundColor', linkBackgroundColor))
|
||||
..add(DiagnosticsProperty('urlLinkTitleMaxLine', urlLinkTitleMaxLine));
|
||||
..add(DiagnosticsProperty(
|
||||
'urlAttachmentTitleMaxLine',
|
||||
urlAttachmentTitleMaxLine,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user