Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/chat.dart Secret

Created Mar 2, 2020
Embed
What would you like to do?
// mobile/lib/chat.dart:51
Widget buildMessage(dynamic message) {
return Row(
mainAxisAlignment: message['userId'] == widget.account['user'] ? MainAxisAlignment.end : MainAxisAlignment.start,
children: [
Container(
child: Text(
message['text'],
style: TextStyle(color: message['userId'] == widget.account['user'] ? Colors.white : Colors.black),
),
padding: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 10.0),
width: 200.0,
decoration: BoxDecoration(
color: message['userId'] == widget.account['user'] ? Colors.blueAccent : Colors.black12,
borderRadius: BorderRadius.circular(8.0)),
margin: EdgeInsets.only(bottom: 10.0, right: 10.0),
)
],
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.