Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于SpUtil的初始化,在闪屏页延迟500毫秒就一定能加载完吗? #9

Closed
bjxiaowanzi opened this issue May 25, 2019 · 2 comments

Comments

@bjxiaowanzi
Copy link

你好,我是flutter新手,查本地存储的时候查到的这个库。发现里面关于异步读取本地存储的代码:
Future.delayed(new Duration(milliseconds: 500), () { /// 同步使用Sp。 /// 是否显示引导页。 if (SpUtil.getBool("key_guide", defValue: true)) { SpUtil.putBool("key_guide", false); _initBanner(); } else { _initSplash(); } });

延迟500毫秒就可以确定是同步读取吗?谢谢

@Sky24n
Copy link
Owner

Sky24n commented May 25, 2019

图片
sp初始化完成才会走后面的逻辑。

@bjxiaowanzi
Copy link
Author

@Sky24n 所以这个500毫秒延时纯粹是为了延时。是我理解错了,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants