favoriteContact method

Future<void> favoriteContact(
  1. ChatContactId id, [
  2. ChatContactFavoritePosition? position
])

Marks the specified ChatContact identified by its id as favorited.

Implementation

Future<void> favoriteContact(
  ChatContactId id, [
  ChatContactFavoritePosition? position,
]) async {
  try {
    await _contactService.favoriteChatContact(id, position);
  } on FavoriteChatContactException catch (e) {
    MessagePopup.error(e);
  } catch (e) {
    MessagePopup.error(e);
    rethrow;
  }
}