Open
Description
I've seen this for a long time and it seems strange. I have something simple like this:
final isOpen = await cursor.moveNext();
if (isOpen) {
final row = cursor.current;
// Do something with row
}
I often see that accessing the current row fails with StateError: Cursor is closed, cannot get current row
. Seems to happen more often if I have a query in a parent page that exists while I navigate into a child page in Flutter.
How is this possible? Isn't the entire point of the return value from moveNext()
to say that it's safe to access current
?
Metadata
Metadata
Assignees
Labels
No labels