38 lines
987 B
Dart
38 lines
987 B
Dart
|
import 'package:flutter/widgets.dart';
|
||
|
import 'package:get/get.dart';
|
||
|
import 'package:sk_base_mobile/config.dart';
|
||
|
import '../../constants/enum.dart';
|
||
|
import '../../store/auth.store.dart';
|
||
|
import '../../util/util.dart';
|
||
|
|
||
|
class LoginController extends GetxController {
|
||
|
final isAgreeTerm = RxBool(false);
|
||
|
|
||
|
Future<void> fastLogin() async {
|
||
|
await confirmAgreement().then((value) async {
|
||
|
if (value != null) {
|
||
|
await AuthStore.to.login(LoginEnum.fastLogin);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
Future confirmAgreement() async {
|
||
|
// if (!isAgreeTerm.value) {
|
||
|
// return Get.defaultDialog(
|
||
|
// title: '',
|
||
|
// content: ConfirmAgreement(),
|
||
|
// titlePadding: const EdgeInsets.all(0));
|
||
|
// } else {
|
||
|
// return Future(() => true);
|
||
|
// }
|
||
|
}
|
||
|
|
||
|
Future<void> onPrivacyPolicyTap() async {
|
||
|
// launchUrl(Uri.parse(GloablConfig.PRIVACY_POLICY));
|
||
|
}
|
||
|
|
||
|
Future<void> onTermTap() async {
|
||
|
// launchUrl(Uri.parse(GloablConfig.TERM_OF_USER));
|
||
|
}
|
||
|
}
|