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

如果一次性使用? #22

Open
hyzhan43 opened this issue May 23, 2024 · 4 comments
Open

如果一次性使用? #22

hyzhan43 opened this issue May 23, 2024 · 4 comments

Comments

@hyzhan43
Copy link

第一次进去 App,需要使用框架介绍,后续就不用介绍,目前能实现这个功能吗?

@hellohejinyu
Copy link
Member

Not supported, it is recommended to use shared_preferences to locally store whether the user has already operated.

@hyzhan43
Copy link
Author

hyzhan43 commented May 23, 2024

好的了解,谢谢你提供的框架。如果有对应框架回调, 初始化回调,介绍完成时回调,就更好了。

目前是通过监听statusNotifier,实现完成时处理逻辑,不知道是不是最佳实现。

var of = Intro.of(context);
of.statusNotifier.addListener(() {
        if (!of.status.isOpen) {
          // 实现 sp 更新
        }
 });

@hellohejinyu
Copy link
Member

你这个建议不错,后续我来加上去。isOpen 目前使用场景只有在用户使用返回键返回时让开发者能知道当前是否在引导状态然后提前终止引导。

你的需求其实应该在调用 start 的时候就标记已经引导过了。因为一般来说用户如果在引导的第一步就选择跳过引导那么也应该算他整个流程结束了,下次不应该再引导他了。

@hyzhan43
Copy link
Author

期待后续更新~

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