import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:sk_base_mobile/util/snack_bar.util.dart';
import '../../store/auth.store.dart';
// import 'package:sentry/sentry.dart';

class LoginController extends GetxController {
  final isAgreeTerm = RxBool(false);
  final formKey = GlobalKey<FormState>();
  final passwordFocusNode = FocusNode();
  String username = '';
  String password = '';
  bool loading = false;
  Future<void> doLogin() async {
    if (username.isEmpty || password.isEmpty) {
      SnackBarUtil().warning('请填写用户名和密码');
      return;
    }
    // 拿出form中的数据
    AuthStore.to.login(username: username, password: password);
  }
}
