|
|
|
|
@ -42,6 +42,7 @@ class User {
|
|
|
|
|
bool? enableWifi;
|
|
|
|
|
bool? enableNFC;
|
|
|
|
|
bool? enableQR;
|
|
|
|
|
bool? isEnabledFaceId;
|
|
|
|
|
bool? onlySwipe;
|
|
|
|
|
|
|
|
|
|
User({
|
|
|
|
|
@ -79,6 +80,7 @@ class User {
|
|
|
|
|
this.enableNFC,
|
|
|
|
|
this.enableQR,
|
|
|
|
|
this.enableWifi,
|
|
|
|
|
this.isEnabledFaceId,
|
|
|
|
|
this.onlySwipe,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -86,9 +88,12 @@ class User {
|
|
|
|
|
|
|
|
|
|
Future<Map<String, dynamic>> toLoginJson() async {
|
|
|
|
|
String notificationType = (Platform.isAndroid && !(await FirebaseNotificationManger.isGoogleServicesAvailable())) ? "HMC" : "FCM";
|
|
|
|
|
if(FirebaseNotificationManger.token==null){
|
|
|
|
|
//calling this agin to check for token as sometimes token is null fresh install..
|
|
|
|
|
await FirebaseNotificationManger.getToken();
|
|
|
|
|
}
|
|
|
|
|
return {"username": userName, "password": password, "fireBaseToken": FirebaseNotificationManger?.token ?? "", "notificationType": notificationType};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UsersTypes? get type {
|
|
|
|
|
switch (userRoles?.first.value) {
|
|
|
|
|
case "R-6":
|
|
|
|
|
@ -167,6 +172,7 @@ class User {
|
|
|
|
|
map['enableNFC'] = enableNFC;
|
|
|
|
|
map['enableQR'] = enableQR;
|
|
|
|
|
map['onlySwipe'] = onlySwipe;
|
|
|
|
|
map['isEnabledFaceId'] = isEnabledFaceId;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -233,6 +239,7 @@ class User {
|
|
|
|
|
enableNFC = json['enableNFC'];
|
|
|
|
|
enableQR = json['enableQR'];
|
|
|
|
|
onlySwipe = json['onlySwipe'];
|
|
|
|
|
isEnabledFaceId = json['isEnabledFaceId'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -300,6 +307,14 @@ class AssetGroup {
|
|
|
|
|
data['enabledEngineerTimer'] = enabledEngineerTimer;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) =>
|
|
|
|
|
identical(this, other) ||
|
|
|
|
|
other is AssetGroup && runtimeType == other.runtimeType && id == other.id;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => id.hashCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class UserContactInfoModel {
|
|
|
|
|
|