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
Issue: Using a bottom nav bar, every page has tooltips numbered 1 to n. However say page 1 has 7 tooltips. It says "x of 7". Page 2 has 3 tooltips. It still says "x of 7".
The text was updated successfully, but these errors were encountered:
@Deuque
I wrote this function, so that if the page is changed, it resets the controller
@overridevoiddidChangeDependencies() {
super.didChangeDependencies();
var tripProvider =Provider.of<TripProvider>(context);
// Get the current page name (You can customize this)int currentPage = tripProvider.selectedIndex;
// Check if the current page is different from the last known pageif (currentPage != _lastPage) {
print("erer");
// Dismiss the tooltips
tooltip_controller.dismiss();
// Update the last known page variablesetState(() {
_lastPage = tripProvider.selectedIndex;
});
}
}
Only the first page is working, not the pages after I change them
The function runs every time a different page is selected. The controller does not seem to be resetting?
Issue: Using a bottom nav bar, every page has tooltips numbered 1 to n. However say page 1 has 7 tooltips. It says "x of 7". Page 2 has 3 tooltips. It still says "x of 7".
The text was updated successfully, but these errors were encountered: