flyerhq / flutter_chat_ui

Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS.
https://flyer.chat
Apache License 2.0
1.61k stars 694 forks source link

'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 259 pos 16: 'child == null || indexOf(child) > index': is not true. #474

Open zzxap opened 1 year ago

zzxap commented 1 year ago

when I send message

it show error

'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 259 pos 16: 'child == null || indexOf(child) > index': is not true.

how to fix it?

demchenkoalex commented 1 year ago

I can't help without seeing what you're sending. But the most common error is when message ids are the same, are you sure your messages have different ids?

elihaialgoaitech commented 1 year ago

You may add a check of duplicate id. and give more clear exception

demchenkoalex commented 1 year ago

I will in a new version

tafsin commented 1 year ago

I am also facing the same issue. Please help anyone.

demchenkoalex commented 1 year ago

make sure you don't have duplicate ids in your messages, id is a unique identifier and stable work is not guaranteed if they repeat

tafsin commented 1 year ago

Thank You. The error is resolved now.