1.對TabController的監(jiān)聽在點擊Tab后會執(zhí)行兩次
每點擊一次,監(jiān)聽都有兩次回調(diào)
解決:
? ??????????
對indexIsChanging進行判斷
2.使用SingleTickerProviderStateMixin報錯
? ? 根據(jù)官方文檔使用(自己也敲了些其他代碼),但是報了個錯
I/flutter ( 9971): A SingleTickerProviderStateMixin can only be used as a TickerProvider once. If a State is used for
I/flutter ( 9971): multiple AnimationController objects, or if it is passed to other objects and those objects might
I/flutter ( 9971): use it more than one time in total, then instead of mixing in a SingleTickerProviderStateMixin, use
I/flutter ( 9971): a regular TickerProviderStateMixin.