getValue method

  1. @override
List<int>? getValue(
  1. SharedPreferences preferences,
  2. String key
)
override

Retrieve a value associated with the key by using the preferences.

Implementation

@override
List<int>? getValue(preferences, key) {
  final values = preferences.getStringList(key);
  if (values == null) return null;

  return values.map(int.parse).toList();
}