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

Discrepancy in Supported Types #150

Open
ian-donnelly-dev opened this issue Sep 2, 2024 · 1 comment
Open

Discrepancy in Supported Types #150

ian-donnelly-dev opened this issue Sep 2, 2024 · 1 comment

Comments

@ian-donnelly-dev
Copy link

There appears to be a discrepancy between the types listed as supported in the GetStorage documentation and what is actually supported. This inconsistency makes it challenging for developers to understand the full capabilities of GetStorage and how to best utilize it in their projects.

I am referring to:

The README states that GetStorage supports the following types: String, int, double, Map, List (bool is not listed here).

Yet, one of the examples includes:

dartCopybool get isDark => box.read('darkmode') ?? false;
void changeTheme(bool val) => box.write('darkmode', val);

Is this being automatically casted to an int or something?

What is the full list of types that GetStorage actually supports?
Is boolean support an intentional feature that was omitted from the documentation?
Are there any other types (e.g. enums) that are supported but not mentioned in the docs?
What is the recommended approach for storing custom types or complex objects?

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
@ian-donnelly-dev and others