We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
你好,我是flutter新手,查本地存储的时候查到的这个库。发现里面关于异步读取本地存储的代码: Future.delayed(new Duration(milliseconds: 500), () { /// 同步使用Sp。 /// 是否显示引导页。 if (SpUtil.getBool("key_guide", defValue: true)) { SpUtil.putBool("key_guide", false); _initBanner(); } else { _initSplash(); } });
Future.delayed(new Duration(milliseconds: 500), () { /// 同步使用Sp。 /// 是否显示引导页。 if (SpUtil.getBool("key_guide", defValue: true)) { SpUtil.putBool("key_guide", false); _initBanner(); } else { _initSplash(); } });
延迟500毫秒就可以确定是同步读取吗?谢谢
The text was updated successfully, but these errors were encountered:
sp初始化完成才会走后面的逻辑。
Sorry, something went wrong.
@Sky24n 所以这个500毫秒延时纯粹是为了延时。是我理解错了,谢谢。
No branches or pull requests
你好,我是flutter新手,查本地存储的时候查到的这个库。发现里面关于异步读取本地存储的代码:
Future.delayed(new Duration(milliseconds: 500), () { /// 同步使用Sp。 /// 是否显示引导页。 if (SpUtil.getBool("key_guide", defValue: true)) { SpUtil.putBool("key_guide", false); _initBanner(); } else { _initSplash(); } });
延迟500毫秒就可以确定是同步读取吗?谢谢
The text was updated successfully, but these errors were encountered: