Future<int> getInt(String key, int def) async { final SharedPreferences prefs = await _prefs; return prefs.getInt(key) ?? def; }