favoriteChat method

Future<void> favoriteChat(
  1. ChatId id, [
  2. ChatFavoritePosition? position
])

Marks the specified Chat identified by its id as favorited.

Implementation

Future<void> favoriteChat(ChatId id, [ChatFavoritePosition? position]) async {
  try {
    await _chatService.favoriteChat(id, position);
  } on FavoriteChatException catch (e) {
    MessagePopup.error(e);
  } catch (e) {
    MessagePopup.error(e);
    rethrow;
  }
}