mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Add deviceName field to FailedOperation and SuccessOperation models
This commit is contained in:
@ -2,11 +2,13 @@ class FailedOperation {
|
|||||||
final bool success;
|
final bool success;
|
||||||
final dynamic deviceUuid;
|
final dynamic deviceUuid;
|
||||||
final dynamic error;
|
final dynamic error;
|
||||||
|
final String deviceName;
|
||||||
|
|
||||||
FailedOperation({
|
FailedOperation({
|
||||||
required this.success,
|
required this.success,
|
||||||
required this.deviceUuid,
|
required this.deviceUuid,
|
||||||
required this.error,
|
required this.error,
|
||||||
|
required this.deviceName,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory FailedOperation.fromJson(Map<String, dynamic> json) {
|
factory FailedOperation.fromJson(Map<String, dynamic> json) {
|
||||||
@ -14,6 +16,7 @@ class FailedOperation {
|
|||||||
success: json['success'],
|
success: json['success'],
|
||||||
deviceUuid: json['deviceUuid'],
|
deviceUuid: json['deviceUuid'],
|
||||||
error: json['error'],
|
error: json['error'],
|
||||||
|
deviceName: json['deviceName'] as String? ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,21 +25,22 @@ class FailedOperation {
|
|||||||
'success': success,
|
'success': success,
|
||||||
'deviceUuid': deviceUuid,
|
'deviceUuid': deviceUuid,
|
||||||
'error': error,
|
'error': error,
|
||||||
|
'deviceName': deviceName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SuccessOperation {
|
class SuccessOperation {
|
||||||
final bool success;
|
final bool success;
|
||||||
// final Result result;
|
// final Result result;
|
||||||
final String deviceUuid;
|
final String deviceUuid;
|
||||||
|
final String deviceName;
|
||||||
|
|
||||||
SuccessOperation({
|
SuccessOperation({
|
||||||
required this.success,
|
required this.success,
|
||||||
// required this.result,
|
// required this.result,
|
||||||
required this.deviceUuid,
|
required this.deviceUuid,
|
||||||
|
required this.deviceName,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory SuccessOperation.fromJson(Map<String, dynamic> json) {
|
factory SuccessOperation.fromJson(Map<String, dynamic> json) {
|
||||||
@ -44,6 +48,7 @@ class SuccessOperation {
|
|||||||
success: json['success'],
|
success: json['success'],
|
||||||
// result: Result.fromJson(json['result']),
|
// result: Result.fromJson(json['result']),
|
||||||
deviceUuid: json['deviceUuid'],
|
deviceUuid: json['deviceUuid'],
|
||||||
|
deviceName: json['deviceName'] as String? ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,6 +57,7 @@ class SuccessOperation {
|
|||||||
'success': success,
|
'success': success,
|
||||||
// 'result': result.toJson(),
|
// 'result': result.toJson(),
|
||||||
'deviceUuid': deviceUuid,
|
'deviceUuid': deviceUuid,
|
||||||
|
'deviceName': deviceName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,8 +98,6 @@ class SuccessOperation {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PasswordStatus {
|
class PasswordStatus {
|
||||||
final List<SuccessOperation> successOperations;
|
final List<SuccessOperation> successOperations;
|
||||||
final List<FailedOperation> failedOperations;
|
final List<FailedOperation> failedOperations;
|
||||||
@ -121,4 +125,3 @@ class PasswordStatus {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class VisitorPasswordDialog extends StatelessWidget {
|
|||||||
child: Text(visitorBloc
|
child: Text(visitorBloc
|
||||||
.passwordStatus!
|
.passwordStatus!
|
||||||
.failedOperations[index]
|
.failedOperations[index]
|
||||||
.deviceUuid)),
|
.deviceName)),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -92,7 +92,7 @@ class VisitorPasswordDialog extends StatelessWidget {
|
|||||||
child: Text(visitorBloc
|
child: Text(visitorBloc
|
||||||
.passwordStatus!
|
.passwordStatus!
|
||||||
.successOperations[index]
|
.successOperations[index]
|
||||||
.deviceUuid)),
|
.deviceName)),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user