wechat_flutter icon indicating copy to clipboard operation
wechat_flutter copied to clipboard

推荐好友,疯狂点击添加会报错。

Open Aaron009 opened this issue 6 years ago • 1 comments

action(UserData model) {
    addFriend(
      model.identifier,
      context,
      suCc: (v) {
        if (v) {
          showToast(context, '添加成功');
          sendTextMsg(model.identifier, 1, '你好${model.name},我添加你为好友啦');
          Navigator.of(context).pop();
        }
      },
    );
  }

这时候的 Navigator.of(context).pop(); 不能这样写,因为有可能content已经销毁。

Aaron009 avatar Nov 28 '19 09:11 Aaron009

忘记改成跟添加好友那一样了

ahyangnb avatar Nov 29 '19 03:11 ahyangnb