mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 04:57:56 +00:00
Added smart door bloc
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
import 'package:syncrow_app/features/devices/model/status_model.dart';
|
||||
|
||||
class SmartDoorModel {
|
||||
String unlockFingerprint;
|
||||
int unlockFingerprint;
|
||||
int unlockPassword;
|
||||
int unlockTemporary;
|
||||
int unlockCard;
|
||||
@@ -39,7 +39,7 @@ class SmartDoorModel {
|
||||
required this.normalOpenSwitch});
|
||||
|
||||
factory SmartDoorModel.fromJson(List<StatusModel> jsonList) {
|
||||
late String _unlockFingerprint;
|
||||
late int _unlockFingerprint;
|
||||
late int _unlockPassword;
|
||||
late int _unlockTemporary;
|
||||
late int _unlockCard;
|
||||
@@ -59,7 +59,7 @@ class SmartDoorModel {
|
||||
|
||||
for (int i = 0; i < jsonList.length; i++) {
|
||||
if (jsonList[i].code == 'unlock_fingerprint') {
|
||||
_unlockFingerprint = jsonList[i].value ?? '';
|
||||
_unlockFingerprint = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'unlock_password') {
|
||||
_unlockPassword = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'unlock_temporary') {
|
||||
Reference in New Issue
Block a user