static int? getInt(String key, {int? defaultValue}) { int? value = sharedPreferences.getInt(key); return value ?? defaultValue; }