0

I'm making a chat app same as whatsapp but I have a problem with the messages when it is wide appear with overflow from the right . Image of problem :

Here is the code of showing the messages :

Row(
        mainAxisAlignment: snapshot.data['$index']['SENDER'] == widget.myname
            ? MainAxisAlignment.end
            : MainAxisAlignment.start,
        children: <Widget>[
          Container(
              decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(10)
              ),
              margin: EdgeInsets.only(left :2.5,top:2.5 ,right: 100),
              padding: EdgeInsets.all(6),
              child:
              Row(
                mainAxisAlignment: MainAxisAlignment.end,
                crossAxisAlignment: CrossAxisAlignment.end,
                children: <Widget>[
                  Text(snapshot.data['$index']['TEXT'],
                      style: TextStyle(fontSize: 17), textAlign: TextAlign.end),
                  SizedBox(
                    width: 10,
                  ),
                  Column(
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: <Widget>[
                      Container(child: Text(
                          snapshot.data['$index']['TIME']['TIME'],
                          style: TextStyle(fontSize: 10),
                          textAlign: TextAlign.end)),
                    ],
                  ),

                ],
              )
          ),
        ],
      );

0 Answers0