getList static method

Get full list

Implementation

static Future<List<StaticStockRecord>> getList() async {
  final prefs = await SharedPreferences.getInstance();

  final jsonList = prefs.getStringList(_key) ?? [];

  return jsonList
      .map((e) => StaticStockRecord.fromJson(jsonDecode(e)))
      .toList();
}