feat: Added text theme instead of hardcoded styles

This commit is contained in:
Deven Joshi
2020-12-28 15:29:29 +05:30
parent 934167c8b7
commit b58d00a5f0
10 changed files with 58 additions and 69 deletions
+14 -12
View File
@@ -51,10 +51,12 @@ class UrlAttachment extends StatelessWidget {
),
child: Text(
hostDisplayName,
style: TextStyle(
fontWeight: FontWeight.w700,
color: Color(0xFF006CFF),
),
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: Color(0xFF006CFF),
),
),
),
decoration: BoxDecoration(
@@ -81,18 +83,18 @@ class UrlAttachment extends StatelessWidget {
urlAttachment.title.trim(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 12.0,
),
style: StreamChatTheme.of(context)
.textTheme
.body
.copyWith(fontWeight: FontWeight.w700),
),
if (urlAttachment.text != null)
Text(
urlAttachment.text,
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 12.0,
),
style: StreamChatTheme.of(context)
.textTheme
.body
.copyWith(fontWeight: FontWeight.w400),
),
],
),