getIntData static method

Future<int> getIntData({
  1. required String key,
})

Implementation

static Future<int> getIntData({required String key}) async {
  final prefs = await SharedPreferences.getInstance();

  return prefs.getInt(key) ?? 0;
}