|
@@ -51,9 +51,6 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker |
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
void initState() { |
|
|
void initState() { |
|
|
Timer(Duration(milliseconds: 0), () { |
|
|
|
|
|
NativeUtil.notifyInitSuccess(); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
///初始化一些数据 |
|
|
///初始化一些数据 |
|
|
initAsync(); |
|
|
initAsync(); |
|
@@ -65,6 +62,10 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker |
|
|
initAsync() async { |
|
|
initAsync() async { |
|
|
try { |
|
|
try { |
|
|
WidgetsBinding.instance.addObserver(this); |
|
|
WidgetsBinding.instance.addObserver(this); |
|
|
|
|
|
///渲染完第一帧后调用 |
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { |
|
|
|
|
|
NativeUtil.notifyInitSuccess(); |
|
|
|
|
|
}); |
|
|
String data = BaseSettingModel.setting.tab['data']; |
|
|
String data = BaseSettingModel.setting.tab['data']; |
|
|
try { |
|
|
try { |
|
|
List list = convert.jsonDecode(data); |
|
|
List list = convert.jsonDecode(data); |
|
|