How do you access the saved prefrences?
I am slightly confused as to how to access the prefrences that we save in the settings page. I see in your example you would start by running
void main() async{
await PrefService.init(prefix: 'pref_');
return runApp(MyApp());
but how do I handle things differently based on the settings. For example if I wanted a setting to be the user's name I would write it
return PreferencePage(
[
PreferenceTitle('User information'),
TextFieldPreference(
'Your Name',
'user_name',
defaultVal: "Bob",
maxLines: 1,
),
]
);
In the main app how to I access the value based on the key?
Sorry I am just learning flutter so it might be my understanding of the default language or the package.