mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 19:44:55 +00:00
Refactor email and password validation logic in LoginForm widget
Update email and password validation logic in the LoginForm widget to only perform validation when the state is not AuthTokenError. This ensures that validation is skipped when there is an authentication token error.
This commit is contained in:
@ -57,9 +57,6 @@ class DeviceModel {
|
||||
}
|
||||
|
||||
factory DeviceModel.fromJson(Map<String, dynamic> json) {
|
||||
print(
|
||||
'type : ${json['productId']} => ${devicesTypesMap[json['productId']]}');
|
||||
|
||||
String icon = '';
|
||||
DeviceType type = devicesTypesMap[json['productId']] ?? DeviceType.Other;
|
||||
|
||||
@ -104,7 +101,8 @@ class DeviceModel {
|
||||
timeZone: json['timeZone'],
|
||||
updateTime: json['updateTime'],
|
||||
uuid: json['uuid'],
|
||||
productType: devicesTypesMap[json['productName']] ?? DeviceType.Other,
|
||||
productType: type,
|
||||
// devicesTypesMap[json['productName']] ?? DeviceType.Other,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user