setStick method
Implementation
void setStick(bool value) {
if (value) {
// 调用Conversation 添加置顶
ConversationRepo.addStickTop(conversationId).then((result) {
if (!result.isSuccess) {
_isStick = false;
notifyListeners();
}
});
} else {
// 调用Conversation 移除置顶
ConversationRepo.removeStickTop(conversationId).then((result) {
if (!result.isSuccess) {
_isStick = true;
notifyListeners();
}
});
}
notifyListeners();
_isStick = value;
}