flutter_chat_ui icon indicating copy to clipboard operation
flutter_chat_ui copied to clipboard

Display system messages

Open felixgabler opened this issue 2 years ago • 6 comments

What does it do?

Show system messages for things like 'YXZ joined the chat'.

Why is it needed?

Using custom messages for such use cases is not great because they are not centered. This makes system messages a first class concept.

Related issues/PRs

Types PR

Built on top of https://github.com/flyerhq/flutter_chat_ui/pull/303. Wait for it before you review and merge.

felixgabler avatar Aug 07 '22 12:08 felixgabler

Thanks for the rebase! I am not sure about this implementation, I think system message should be part of the animated list like any other message? Otherwise it will just drop in randomly.

demchenkoalex avatar Aug 14 '22 19:08 demchenkoalex

Thanks for the rebase! I am not sure about this implementation, I think system message should be part of the animated list like any other message? Otherwise it will just drop in randomly.

They are part of the animated list though. The Message widget does not perform animation critical functions but just provides avatar, name, border radius etc. For system messages, we really want to prevent all of that and place it centered.

The only things that we could think about adding is gesture detection (although I don't know how useful that would be) and maybe visibility detection (also not sure how useful). In any case, fitting the system messages into the constraints of the Message widget would be a mistake imho.

felixgabler avatar Aug 14 '22 19:08 felixgabler

OK, my mistake :D

demchenkoalex avatar Aug 14 '22 20:08 demchenkoalex

Hey @demchenkoalex, is there anything missing before we can merge?

felixgabler avatar Aug 23 '22 10:08 felixgabler

I don't think so, will take a look

demchenkoalex avatar Aug 27 '22 06:08 demchenkoalex

will resolve this ASAP

demchenkoalex avatar Oct 02 '22 21:10 demchenkoalex

Thanks for the PR!

demchenkoalex avatar Oct 29 '22 08:10 demchenkoalex