services/storage_service.dart
unknown
dart
a month ago
403 B
1
Indexable
Never
import 'package:shared_preferences/shared_preferences.dart'; class StorageService { Future<void> saveRoutine(String key, String routine) async { final prefs = await SharedPreferences.getInstance(); prefs.setString(key, routine); } Future<String?> getRoutine(String key) async { final prefs = await SharedPreferences.getInstance(); return prefs.getString(key); } }
Leave a Comment