feat: add support for url attachment theming.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-04-26 17:50:06 +05:30
committed by xsahil03x
parent 5c7fc74c5b
commit 90c4dae5b1
7 changed files with 114 additions and 26 deletions
@@ -79,7 +79,7 @@ class StreamUrlAttachment extends StatelessWidget {
borderRadius: const BorderRadius.only(
topRight: Radius.circular(16),
),
color: messageTheme.linkBackgroundColor,
color: messageTheme.urlAttachmentBackgroundColor,
),
child: Padding(
padding: const EdgeInsets.only(
@@ -89,9 +89,7 @@ class StreamUrlAttachment extends StatelessWidget {
),
child: Text(
hostDisplayName,
style: chatThemeData.textTheme.bodyBold.copyWith(
color: chatThemeData.colorTheme.accentPrimary,
),
style: messageTheme.urlAttachmentHostStyle,
),
),
),
@@ -109,14 +107,12 @@ class StreamUrlAttachment extends StatelessWidget {
urlAttachment.title!.trim(),
maxLines: messageTheme.urlAttachmentTitleMaxLine ?? 1,
overflow: TextOverflow.ellipsis,
style: chatThemeData.textTheme.body
.copyWith(fontWeight: FontWeight.w700),
style: messageTheme.urlAttachmentTitleStyle,
),
if (urlAttachment.text != null)
Text(
urlAttachment.text!,
style: chatThemeData.textTheme.body
.copyWith(fontWeight: FontWeight.w400),
style: messageTheme.urlAttachmentTextStyle,
),
],
),