|
...
|
...
|
@@ -828,6 +828,7 @@ class HealthRawDataCoreService { |
|
|
|
) {
|
|
|
|
return <String, Object?>{
|
|
|
|
'type': notification.recordType.name,
|
|
|
|
'data_type': _localNotificationDataType(notification.recordType),
|
|
|
|
'record_time': notification.recordTime,
|
|
|
|
'title': notification.title,
|
|
|
|
'content': notification.content,
|
|
...
|
...
|
@@ -836,6 +837,16 @@ class HealthRawDataCoreService { |
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
int _localNotificationDataType(
|
|
|
|
HealthRawLocalNotificationRecordType recordType,
|
|
|
|
) {
|
|
|
|
return switch (recordType) {
|
|
|
|
HealthRawLocalNotificationRecordType.realtimeStress => 0,
|
|
|
|
HealthRawLocalNotificationRecordType.hrv => 1,
|
|
|
|
HealthRawLocalNotificationRecordType.sleep => 2,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, Object?> _localNotificationRecordPayload(
|
|
|
|
HealthRawLocalNotificationRecord record,
|
|
|
|
) {
|
...
|
...
|
|