Use pattleTheme as variable

parent 378f12f6
......@@ -273,22 +273,21 @@ class MessageBubble extends StatelessWidget {
@override
Widget build(BuildContext context) {
final pattleTheme = context.pattleTheme;
var color = this.color;
if (color == null) {
if (message.isMine) {
if (!isRepliedTo) {
color = context.pattleTheme.data.chat.myMessage.backgroundColor;
color = pattleTheme.data.chat.myMessage.backgroundColor;
} else {
color =
context.pattleTheme.data.chat.myMessage.repliedTo.backgroundColor;
color = pattleTheme.data.chat.myMessage.repliedTo.backgroundColor;
}
} else {
if (!isRepliedTo) {
color = context.pattleTheme.data.chat.theirMessage.backgroundColor;
color = pattleTheme.data.chat.theirMessage.backgroundColor;
} else {
color = context
.pattleTheme.data.chat.theirMessage.repliedTo.backgroundColor;
color = pattleTheme.data.chat.theirMessage.repliedTo.backgroundColor;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment