-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello I am getting problem as when we do chat message position get change automatically.It should come one after another but it go on upside I think there is problem with sort function which you are using with firebaseanimatedlistview. Problem may be with this sort: (a, b) => b.key.compareTo(a.key),Please answer
child: FirebaseAnimatedList(
reverse: true,
sort: (a, b) => b.key.compareTo(a.key),
query: secretchatref,
itemBuilder: (_, DataSnapshot data,
Animation animation, int index) {
String name = data.value['username'];
ChatMessage message = new ChatMessage.fromSnapshot(
data,
animation,
data.value['username'] == widget.myname
? TextDirection.rtl
: TextDirection.ltr,
name);
return message;
}),
),
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels