edit key word api added

This commit is contained in:
amirrezaghabeli
2026-04-25 12:13:49 +03:30
parent eb75952b8e
commit 00a3180499
13 changed files with 542 additions and 69 deletions
+21
View File
@@ -94,4 +94,25 @@ class ProfileViewModel with ChangeNotifier {
_loggedOut = false;
notifyListeners();
}
Future<void> updateProfileKeyWords({required List<String> keyWords}) async {
_isLoading = true;
_errorMessage = null;
notifyListeners();
final result = await _profileRepository.updateProfileKeyWords(
keyWords: keyWords,
);
switch (result) {
case Ok<ProfileResponse>():
_profileData = result.value.data;
break;
case Error<ProfileResponse>():
_errorMessage = result.error.toString();
break;
}
_isLoading = false;
notifyListeners();
_errorMessage = null;
notifyListeners();
}
}