mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Reduce containers size for small messages
This commit is contained in:
		@@ -98,7 +98,7 @@ class ConversationMessageTile extends StatelessWidget {
 | 
			
		||||
  /// Build a message of the current user
 | 
			
		||||
  Widget _buildRightMessage(BuildContext context) {
 | 
			
		||||
    return Container(
 | 
			
		||||
      margin: EdgeInsets.only(bottom: isLastMessage ? 20.0 : 10.0),
 | 
			
		||||
      margin: EdgeInsets.only(bottom: isLastMessage ? 20.0 : 2.0),
 | 
			
		||||
      child: Row(
 | 
			
		||||
        mainAxisAlignment: MainAxisAlignment.end,
 | 
			
		||||
        children: <Widget>[
 | 
			
		||||
@@ -119,17 +119,20 @@ class ConversationMessageTile extends StatelessWidget {
 | 
			
		||||
                      Container(
 | 
			
		||||
                        child: message.hasMessage
 | 
			
		||||
                            ? Container(
 | 
			
		||||
                                child: TextRichContentWidget(
 | 
			
		||||
                                  message.message,
 | 
			
		||||
                                  textAlign: TextAlign.justify,
 | 
			
		||||
                                  style: TextStyle(color: Colors.white),
 | 
			
		||||
                                ),
 | 
			
		||||
                                padding:
 | 
			
		||||
                                    EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 10.0),
 | 
			
		||||
                                width: 200.0,
 | 
			
		||||
                                decoration: BoxDecoration(
 | 
			
		||||
                                  color: Colors.blueAccent,
 | 
			
		||||
                                  borderRadius: BorderRadius.circular(8.0),
 | 
			
		||||
                                alignment: Alignment.centerRight,
 | 
			
		||||
                                child: Container(
 | 
			
		||||
                                  child: TextRichContentWidget(
 | 
			
		||||
                                    message.message,
 | 
			
		||||
                                    textAlign: TextAlign.justify,
 | 
			
		||||
                                    style: TextStyle(color: Colors.white),
 | 
			
		||||
                                  ),
 | 
			
		||||
                                  padding: EdgeInsets.fromLTRB(
 | 
			
		||||
                                      15.0, 10.0, 15.0, 10.0),
 | 
			
		||||
                                  decoration: BoxDecoration(
 | 
			
		||||
                                    color: Colors.blueAccent,
 | 
			
		||||
                                    borderRadius: BorderRadius.circular(8.0),
 | 
			
		||||
                                  ),
 | 
			
		||||
                                ),
 | 
			
		||||
                              )
 | 
			
		||||
                            : null,
 | 
			
		||||
@@ -191,17 +194,20 @@ class ConversationMessageTile extends StatelessWidget {
 | 
			
		||||
                  Container(
 | 
			
		||||
                    child: message.hasMessage
 | 
			
		||||
                        ? Container(
 | 
			
		||||
                            child: TextRichContentWidget(
 | 
			
		||||
                              message.message,
 | 
			
		||||
                              textAlign: TextAlign.justify,
 | 
			
		||||
                              style: TextStyle(color: Colors.black),
 | 
			
		||||
                            ),
 | 
			
		||||
                            padding:
 | 
			
		||||
                                EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 10.0),
 | 
			
		||||
                            width: 200.0,
 | 
			
		||||
                            decoration: BoxDecoration(
 | 
			
		||||
                              color: Colors.black12,
 | 
			
		||||
                              borderRadius: BorderRadius.circular(8.0),
 | 
			
		||||
                            alignment: Alignment.centerLeft,
 | 
			
		||||
                            child: Container(
 | 
			
		||||
                              child: TextRichContentWidget(
 | 
			
		||||
                                message.message,
 | 
			
		||||
                                textAlign: TextAlign.justify,
 | 
			
		||||
                                style: TextStyle(color: Colors.black),
 | 
			
		||||
                              ),
 | 
			
		||||
                              padding:
 | 
			
		||||
                                  EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 10.0),
 | 
			
		||||
                              decoration: BoxDecoration(
 | 
			
		||||
                                color: Colors.black12,
 | 
			
		||||
                                borderRadius: BorderRadius.circular(8.0),
 | 
			
		||||
                              ),
 | 
			
		||||
                            ),
 | 
			
		||||
                          )
 | 
			
		||||
                        : null,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user