SingleTickerProviderStateMixin报错

来源:16-3 使用TabBar+TabBarView 实现旅拍可滑动切换多Tab

远远辰

2019-08-25

A SingleTickerProviderStateMixin can only be used as a TickerProvider once. If a State is used for multiple AnimationController objects, or if it is passed to other objects and those objects might use it more than one time in total, then instead of mixing in a SingleTickerProviderStateMixin, use a regular TickerProviderStateMixin.

但是改成TickerProviderStateMixin就可以了

写回答

1回答

CrazyCodeBoy

2019-08-25

高版本flutter中SingleTickerProviderStateMixin有变化,建议将SingleTickerProviderStateMixin改成TickerProviderStateMixin

1
0

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3270 问题

查看课程