control_config

Creator: coderz1093

Last updated:

0 purchases

control_config Image
control_config Images

Languages

Categories

Add to Cart

Description:

control config

Part of [flutter_control] family #
This library is wrapper around [shared_preferences]
Mixin provider:
class UserPrefs with PrefsProvider {

String get userId => prefs.get('user_id');

set userId(String value) => prefs.set('user_id', value);
}
copied to clipboard
Model:
final boolPref = PrefModel.boolean('visited');
final numPref = PrefModel.number('fav_num', defaultValue: -1);

void updateVisited() {
boolPref.value = numPref.value > 0;
}
copied to clipboard
Instance:
final id = PrefsProvider.instance.get('user_id');
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.