Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,22 @@ class InstabugNavigatorObserver extends NavigatorObserver {
// If there is a step that hasn't been pushed yet
if (_steps.isNotEmpty) {
await reportScreenChange(_steps.last.name);
}
// Check again if there is a step that hasn't been pushed yet after the async operation above.
if (_steps.isNotEmpty) {
// Report the last step and remove it from the list
_steps.removeLast();
}

// Add the new step to the list
_steps.add(route);

// If this route is in the array, report it and remove it from the list
// If this route is in the array, report it
if (_steps.contains(route)) {
await reportScreenChange(route.name);
}
// Check again if this route is still in the list after async operation, remove it from the list
if (_steps.contains(route)) {
_steps.remove(route);
}
});
Expand Down