if we want to know the difference between the sender and receiver, each one of them should have a color, for example : senders bubble should be green and receiver’s should be white, how can we implement such a thing?
First, use the package
ChatBubble( shadows: <Shadow>[ Shadow( color: Colors.grey, offset: Offset(-1.0, -1.0), blurRadius: 0.1, ), Shadow( color: Colors.grey, offset: Offset(1.0, 1.0), blurRadius: 0.4, ) ], direction: reverse ? ChatBubbleNipDirection.RIGHT: ChatBubbleNipDirection.LEFT, child: Container( color: isReceiver ? Colors.white : Colors.green, child: img, ),
isReceiver is a
bool variable that denotes whether it is a receiver or sender.
Answered By – Roslan Amir