You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
fails the following assertion when data is added/removed inside an animated list that contains sorting logic. index != null && index >= 0': is not true.
also when a new record is added it removes the oldest record from the screen and adds this new one
eg. if I have 5 records on screen and I add new then on the screen it will be still five but the new added will be there and previously the record that was first will be removed.
FirebaseAnimatedList(
query: FirebaseDatabase.instance.ref('Messages/chatId')),
reverse: true,
sort: (DataSnapshot a, DataSnapshot b) {
return b.key!.compareTo(a.key!);
},
itemBuilder: (
BuildContext context,
DataSnapshot snapshot,
Animation<double> animation,
int index,
) {
// return Item;
}
then add/remove the record under the given node that the above list is listening
Expected behavior
should not give an error.
should add a new record to the screen without removing the older one.
Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.6, on macOS 13.0 22A380 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Community Edition (version 2022.2.3)
[✓] VS Code (version 1.72.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
• No issues found!
Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Thanks for the report. There's similar issue open describing your case, #7100 so please follow-up in it for further updates. You may share your findings in it if you like.
Bug report
Describe the bug
fails the following assertion when data is added/removed inside an animated list that contains sorting logic.
index != null && index >= 0': is not true.
also when a new record is added it removes the oldest record from the screen and adds this new one
eg. if I have 5 records on screen and I add new then on the screen it will be still five but the new added will be there and previously the record that was first will be removed.
stacktrace
Steps to reproduce
Steps to reproduce the behavior:
then add/remove the record under the given node that the above list is listening
Expected behavior
should not give an error.
should add a new record to the screen without removing the older one.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: