Flutter TabController wechselt die Registerkarte zweimal, Rückrufproblem

Beim Klicken zum Wechseln der Registerkarten wird ein Animationseffekt ausgeführt und dabei eine Listener-Reparatur ausgelöst
:

 _tabController.addListener(() {
    
    
      if (_tabController.index == _tabController.animation.value) {
    
    
        currentTopTabIndex = _tabController.index;
      }
});

Supongo que te gusta

Origin blog.csdn.net/androidhyf/article/details/132719374
Recomendado
Clasificación