You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we need to manually define SharedPreferences name and key name, but what if we can generate these name from class/field name?
for example
@PrefclassSample { // preference name will be "sample"@KeylonglongValue = false; // key name will be "long_value"@KeyStringstringValue = "default_value"; // key name will be "string_value"
}
logic is quite simple, just convert CamelCase to snake_case.
Of course we can still provide custom name with @Key(name = "key_name")
The text was updated successfully, but these errors were encountered:
Currently we need to manually define SharedPreferences name and key name, but what if we can generate these name from class/field name?
for example
logic is quite simple, just convert CamelCase to snake_case.
Of course we can still provide custom name with
@Key(name = "key_name")
The text was updated successfully, but these errors were encountered: