Closed pavkoccino closed 3 months ago
Hi @pavkoccino, Thanks for filing the detailed issue , it is really helpful, I will investigate and get back on this.
Thank you, luckily this exception is not bothering me in release as it is "invisible", but during development it is annoying and should not happen.
Self Notes:
This issue is when trying to scroll to a widget that is no longer in the widget tree, Since the listview lazily loads the widgets
if (widget.selected == index) {
SchedulerBinding.instance.addPostFrameCallback((timeStamp) {
if (mounted) {
Scrollable.ensureVisible(context,
alignment: 0.1, duration: Duration(milliseconds: 300));
}
});
}
Thanks for fast fix! Today I updated to 1.0.9 and can confirm that the issue does not happen anymore.
Describe the bug There seems to be an issue in your ListView widget (see specifically this line in stack
_SFListviewState.build.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:searchfield/src/listview.dart:167:30)
) when I am scrolling through the list and then typing more letters. I can reliably reproduce it.Stack:
To Reproduce Steps to reproduce the behavior:
[✅] By clicking this checkbox, I confirm I am using the latest version of the package found on pub.dev/searchfield - YES, I am using version 1.0.8
Expected behavior No exception when scrolling and typing more letters into the search.
Actual behavior Mentioned exception occurs.
Use the following widget in some of your project. I tried to cut out everything unimportant to be still able to reproduce it. Code sample
Show code sample
```dart import 'package:flutter/material.dart'; import 'package:searchfield/searchfield.dart'; /// Handles allergies and medicaments therefore is a bit more complex class CustomSearchField extends StatefulWidget { const CustomSearchField(); @override StateAdditional context I checked other issues and haven't found anything similar. I am using version 1.0.8 See the attached video
https://github.com/user-attachments/assets/2466d4a8-710a-4236-ada2-a43430f4748a