Generic method to save data
Future<void> writeData<T>(String key, T value) async { await _storage.write(key, value); }