22 lines
587 B
Dart
22 lines
587 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:get/get.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 (!formKey.currentState!.validate()) {
|
|
return;
|
|
}
|
|
|
|
// 拿出form中的数据
|
|
AuthStore.to.login(username: username, password: password);
|
|
}
|
|
}
|