alibaba / fish-redux

An assembled flutter application framework.
https://github.com/alibaba/fish-redux
Apache License 2.0
7.33k stars 843 forks source link

我的page页面不走initstate方法 #684

Closed beydeng closed 4 years ago

beydeng commented 4 years ago

代码如下,但是 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(); }