Fixes issue with removing and re-adding a toolbar which is connected to the same TabBarController (#9015)
This commit is contained in:
parent
657a4c3fc6
commit
e271fa3e76
@ -478,8 +478,10 @@ class _TabBarState extends State<TabBar> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (_controller != null)
|
||||
if (_controller != null) {
|
||||
_controller.animation.removeListener(_handleTabControllerAnimationTick);
|
||||
_controller.removeListener(_handleTabControllerTick);
|
||||
}
|
||||
// We don't own the _controller Animation, so it's not disposed here.
|
||||
super.dispose();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user