toggleFavoriteLoader method
Toggle favorite status of a loader.
Implementation
void toggleFavoriteLoader(String loaderId) {
final list = List<String>.from(_state.favoriteLoaderIds);
if (list.contains(loaderId)) {
list.remove(loaderId);
} else {
list.add(loaderId);
}
_state = _state.copyWith(
favoriteLoaderIds: list,
lastModifiedAt: DateTime.now(),
);
_notify();
}