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

Difficulty with Settings().onStringChanged #24

Open
SubutaDan opened this issue Jan 30, 2021 · 2 comments
Open

Difficulty with Settings().onStringChanged #24

SubutaDan opened this issue Jan 30, 2021 · 2 comments

Comments

@SubutaDan
Copy link

Hello,

I am enjoying working with shared_preferences_settings. Thanks for making it available.

I have run into a possible issue when using the example code in my app for the first time after uninstalling the app (which flushes its storage) and then reinstalling it. I encounter a failed assertion in the Settings().onStringChanged example, apparently because "value" is null when the screen is being drawn. If I hack a non-null value in for "value" like this:

 childBuilder: (BuildContext context, String value) {
            //return Text(value);
            return Text("Gleeb");
          }

and hot reload then the problem goes away. If I revert the hack and hot reload again, the problem reappears.

Note that I have commented out the provider and auth_provider imports as they appear to be unused.

Can you suggest what I might be doing wrong or let me know how to resolve this?

Thanks.

-Dan

@barnabasbartha
Copy link
Owner

barnabasbartha commented Jan 30, 2021 via email

@SubutaDan
Copy link
Author

SubutaDan commented Jan 30, 2021 via email

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