我的page页面不走initstate方法
Closed this issue · 0 comments
beydeng commented
代码如下,但是 initState: initState方法并没有运行,所以无法实力话state,请教下是什么问题
class IndexPage extends Page<IndexState, Map<String, dynamic>> {
IndexPage()
: super(
initState: initState,
effect: buildEffect(),
reducer: buildReducer(),
view: buildView,
dependencies: Dependencies(
adapter: null,
slots: <String, Dependent>{
'tabBar': TabBarConnector() + TabBarComponent(),
'homePage' : HomeConnector() + HomePage(),
'mine' : MineConnector() + MinePage()
}),
middleware: <Middleware>[
],);
}
HomeState initState(Map<String, dynamic> args) {
return HomeState()
..title = '首页'
..isBackIconShow = false
..themeColor = Colors.blue
..rightTitle = ''
..categoryDatas = List();
}