import 'package:injectable/injectable.dart';
import 'package:keyboard/base/base_controller.dart';
import 'package:get/get.dart';

import '../../../utils/toast_util.dart';

@injectable
class ChangeGenderController extends BaseController {
  final tag = "ChangeGenderController";

  final RxnInt currentGender = RxnInt(null);

  ChangeGenderController();

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    currentGender.value = Get.arguments?["gender"];
  }

  void clickBack() {
    Get.back();
  }

  void clickSave() {
    if (currentGender.value == null) {
      ToastUtil.show("请选择性别");
      return;
    }
    Get.back(result: currentGender.value);
  }
}
