NFC Attendance implement 1.0

merge-requests/1/merge
devmirza121 4 years ago
parent 68729ddbb9
commit 35d683a8ae

@ -69,12 +69,12 @@ class _LoginScreenState extends State<LoginScreen> {
}
String? firebaseToken;
GetMobileLoginInfoListModel? loginInfo;
Future<void> checkFirebaseToken() async {
try {
Utils.showLoading(context);
firebaseToken = await _firebaseMessaging.getToken();
GetMobileLoginInfoListModel? loginInfo = await LoginApiClient().getMobileLoginInfoNEW(firebaseToken ?? "", Platform.isAndroid ? "android" : "ios");
loginInfo = await LoginApiClient().getMobileLoginInfoNEW(firebaseToken ?? "", Platform.isAndroid ? "android" : "ios");
if (loginInfo == null) {
Utils.hideLoading(context);
print("Device token not found");
@ -112,7 +112,7 @@ class _LoginScreenState extends State<LoginScreen> {
}
Utils.hideLoading(context);
if (_autoLogin) {
Navigator.pushNamed(context, AppRoutes.verifyLastLogin);
Navigator.pushNamed(context, AppRoutes.verifyLastLogin, arguments: loginInfo);
} else {
Navigator.pushNamed(context, AppRoutes.verifyLogin, arguments: "$firebaseToken");
}
@ -125,10 +125,11 @@ class _LoginScreenState extends State<LoginScreen> {
}
}
@override
Widget build(BuildContext context) {
username.text="15153";
password.text="Xy12345@";
username.text = "15153";
password.text = "Xy12345@";
return Scaffold(
body: Column(
children: [

Loading…
Cancel
Save