Future<bool> clear() async { // Get SharedPreferences ref final SharedPreferences ref = await preferences; // Clear all data return ref.clear(); }