1.对TabController的监听在点击Tab后会执行两次


每点击一次,监听都有两次回调
解决:

2.使用SingleTickerProviderStateMixin报错
根据官方文档使用(自己也敲了些其他代码),但是报了个错 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.
解决:

将SingleTickerProviderStateMixin换成TickerProviderStateMixin