GAM3RG33K / flutter_settings_screens

Settings Screen with Custom Shared Preference Interface
MIT License
176 stars 71 forks source link

fix type comparison #92

Closed nyxkn closed 2 years ago

nyxkn commented 2 years ago

I was getting the exception when using getValue without the optional default value.

I figure the type comparison is done incorrectly in getValue(). I think we should use type == type and variable is type for proper comparisons.

Don't know what setObject does, but I noticed the same mistake so I went and fixed that too.

GAM3RG33K commented 2 years ago

Great catch.

Will merge the PR after a brief review.

I don't have type to test this change now. But will let you know if there's any change required or need to be reverted from these.