From 9b53a3b0c9712f9a23c421c501f1bc1cae409664 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 17 Apr 2020 11:56:28 +0200 Subject: [PATCH] Improve links color --- lib/ui/tiles/conversation_message_tile.dart | 1 + lib/ui/widgets/text_widget.dart | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ui/tiles/conversation_message_tile.dart b/lib/ui/tiles/conversation_message_tile.dart index 39f7959..8963a66 100644 --- a/lib/ui/tiles/conversation_message_tile.dart +++ b/lib/ui/tiles/conversation_message_tile.dart @@ -128,6 +128,7 @@ class ConversationMessageTile extends StatelessWidget { content: message.message, textAlign: TextAlign.justify, style: TextStyle(color: Colors.white), + linksColor: Colors.indigo, ), padding: EdgeInsets.fromLTRB( 15.0, 10.0, 15.0, 10.0), diff --git a/lib/ui/widgets/text_widget.dart b/lib/ui/widgets/text_widget.dart index da8fd7f..21dd512 100644 --- a/lib/ui/widgets/text_widget.dart +++ b/lib/ui/widgets/text_widget.dart @@ -16,6 +16,7 @@ class TextWidget extends StatelessWidget { final bool parseBBcode; final TextStyle style; final TextAlign textAlign; + final Color linksColor; const TextWidget({ Key key, @@ -23,8 +24,10 @@ class TextWidget extends StatelessWidget { this.parseBBcode = false, this.textAlign = TextAlign.start, this.style, + this.linksColor = Colors.blueAccent, }) : assert(content != null), assert(parseBBcode != null), + assert(linksColor != null), super(key: key); @override @@ -77,7 +80,7 @@ class TextWidget extends StatelessWidget { child: InkWell( child: Text( word, - style: style.copyWith(color: Colors.indigo), + style: style.copyWith(color: linksColor), ), onTap: () => launch(word), ), @@ -96,7 +99,7 @@ class TextWidget extends StatelessWidget { child: InkWell( child: Text( word, - style: style.copyWith(color: Colors.indigo), + style: style.copyWith(color: linksColor), ), onTap: () => openVirtualDirectory(context, word), ),