更新Flutter Environment之后,出现此问题。请帮我解决这个问题。
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: topBar(),
body: TabBarView( // problem indicates here
children: _kTabPages,
controller: _tabController,
),
// Button Navigation
bottomNavigationBar: Material(
color: Colors.redAccent,
child: TabBar(
tabs: _kTabs,
controller: _tabController,
),
)),
);
}
请尽快帮助我。
答案 0 :(得分:4)
以下是github问题:AnimationController has lost it's vsync,
您可以按照以下步骤解决此问题:
1. Change minimum sdk to 2.8
2. Run flutter upgrade
3. Run flutter pub get
4. Run flutter clean
5. Restart IDE