putObjectList static method

Future<bool>? putObjectList(
  1. String key,
  2. List<Object> list
)

put object list.

Implementation

static Future<bool>? putObjectList(String key, List<Object> list) {
  List<String>? _dataList = list.map((value) {
    return json.encode(value);
  }).toList();
  return _prefs?.setStringList(key, _dataList);
}