fix: Fixed colors of message attachments
This commit is contained in:
@@ -683,14 +683,10 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
Color _getIconColor(int index) {
|
Color _getIconColor(int index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
return _attachmentContainsFile && _attachments.isNotEmpty
|
return _attachments.isEmpty ? StreamChatTheme.of(context).accentColor : (!_attachmentContainsFile ? StreamChatTheme.of(context).accentColor : Colors.black.withOpacity(0.2));
|
||||||
? Colors.black.withOpacity(0.2)
|
|
||||||
: Colors.black.withOpacity(0.5);
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return !_attachmentContainsFile && _attachments.isNotEmpty
|
return _attachmentContainsFile ? StreamChatTheme.of(context).accentColor : (_attachments.isEmpty ? Colors.black.withOpacity(0.5) : Colors.black.withOpacity(0.2));
|
||||||
? Colors.black.withOpacity(0.2)
|
|
||||||
: Colors.black.withOpacity(0.5);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return _attachmentContainsFile && _attachments.isNotEmpty
|
return _attachmentContainsFile && _attachments.isNotEmpty
|
||||||
|
|||||||
Reference in New Issue
Block a user