part of user_nick;

class UserNickController extends GetxController {
  final UserInfoModel userInfo;

  UserNickController(this.userInfo);

  /// 修改用用户信息
  void _changeInfo(String nick) async {
    final result = await MineAPI.changeInfo(name: nick);
    if (result) {
      Toast.show('修改成功');
      userInfo.name = nick ;
      update();
    }
  }
}
