Open senshi900 opened 3 months ago
Hello!
Could you provide more details about the issue? Do you have any error messages or logs that could help us understand the problem better?
Hello,
Thank you for your prompt response. Upon further investigation, it appears that there are no error logs generated regarding the issue. However, during debugging sessions, it became evident that the alarm object is arriving as null within the application, temporarily i solved the problem by ensuring that if the 'details' field in the JSON data is not a Map<String, dynamic>, it assigns null to the alarm model
note: the update is in line 94 for Alarm.fromJson solve the problem
Even though alarms are present on the website, they do not appear in the app.
Could you please put a breakpoint inside the Alarm.fromJson
method and check the value of json['details']
?
Alternatively, expand the json
field and provide a screenshot. This will help us understand the datatype you are receiving.
@senshi900
sure here is a screenshot of the debugging result
but this line of code fix the problem
Hello, I'm encountering an issue where I'm not receiving alarms within the app. After investigating, I discovered a solution involving the following code snippet:
This code modification resolves the problem temporarily. However, when sharing the code with other developers, they're unable to observe the changes. Is there a solution to this issue that doesn't involve modifying the model?
Just for your reference, I'm using PE app version 1.1.0. The file where I implemented the changes is located at: "C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\thingsboard_pe_client-1.1.0\lib\src\model\alarm_models".
Thank you.![image](https://github.com/thingsboard/flutter_thingsboard_pe_app/assets/129005111/20e72ed6-48c9-4a33-b180-40853a73bc8f)