|
1
|
-import 'dart:ui';
|
|
|
|
2
|
-
|
|
|
|
3
|
import 'package:doublefeel_flutter/core/theme/app_theme.dart';
|
1
|
import 'package:doublefeel_flutter/core/theme/app_theme.dart';
|
|
4
|
import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
|
2
|
import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
|
|
5
|
-import 'package:flutter/src/widgets/framework.dart';
|
3
|
+import 'package:flutter/widgets.dart';
|
|
6
|
|
4
|
|
|
7
|
int? _parseInt(dynamic value) {
|
5
|
int? _parseInt(dynamic value) {
|
|
8
|
if (value == null) return null;
|
6
|
if (value == null) return null;
|
|
@@ -326,6 +324,8 @@ class V2RealtimeStressItem { |
|
@@ -326,6 +324,8 @@ class V2RealtimeStressItem { |
|
326
|
this.value,
|
324
|
this.value,
|
|
327
|
this.state,
|
325
|
this.state,
|
|
328
|
this.isWorkout,
|
326
|
this.isWorkout,
|
|
|
|
327
|
+ this.isWorkoutRecovery,
|
|
|
|
328
|
+ this.isSleepLikely,
|
|
329
|
this.isSuspectedActivity,
|
329
|
this.isSuspectedActivity,
|
|
330
|
this.isMoving,
|
330
|
this.isMoving,
|
|
331
|
this.isAsleep});
|
331
|
this.isAsleep});
|
|
@@ -334,6 +334,8 @@ class V2RealtimeStressItem { |
|
@@ -334,6 +334,8 @@ class V2RealtimeStressItem { |
|
334
|
final int? value;
|
334
|
final int? value;
|
|
335
|
final int? state;
|
335
|
final int? state;
|
|
336
|
final int? isWorkout;
|
336
|
final int? isWorkout;
|
|
|
|
337
|
+ final int? isWorkoutRecovery;
|
|
|
|
338
|
+ final int? isSleepLikely;
|
|
337
|
final int? isSuspectedActivity;
|
339
|
final int? isSuspectedActivity;
|
|
338
|
final int? isMoving;
|
340
|
final int? isMoving;
|
|
339
|
final int? isAsleep;
|
341
|
final int? isAsleep;
|
|
@@ -344,6 +346,8 @@ class V2RealtimeStressItem { |
|
@@ -344,6 +346,8 @@ class V2RealtimeStressItem { |
|
344
|
value: _parseInt(json['value']),
|
346
|
value: _parseInt(json['value']),
|
|
345
|
state: _parseInt(json['state']),
|
347
|
state: _parseInt(json['state']),
|
|
346
|
isWorkout: _parseInt(json['is_workout']),
|
348
|
isWorkout: _parseInt(json['is_workout']),
|
|
|
|
349
|
+ isWorkoutRecovery: _parseInt(json['is_workout_recovery']),
|
|
|
|
350
|
+ isSleepLikely: _parseInt(json['is_sleep_likely']),
|
|
347
|
isSuspectedActivity: _parseInt(json['is_suspected_activity']),
|
351
|
isSuspectedActivity: _parseInt(json['is_suspected_activity']),
|
|
348
|
isMoving: _parseInt(json['is_moving']),
|
352
|
isMoving: _parseInt(json['is_moving']),
|
|
349
|
isAsleep: _parseInt(json['is_asleep']),
|
353
|
isAsleep: _parseInt(json['is_asleep']),
|
|
@@ -356,8 +360,13 @@ class V2RealtimeStressItem { |
|
@@ -356,8 +360,13 @@ class V2RealtimeStressItem { |
|
356
|
if (value != null) val['value'] = value;
|
360
|
if (value != null) val['value'] = value;
|
|
357
|
if (state != null) val['state'] = state;
|
361
|
if (state != null) val['state'] = state;
|
|
358
|
if (isWorkout != null) val['is_workout'] = isWorkout;
|
362
|
if (isWorkout != null) val['is_workout'] = isWorkout;
|
|
359
|
- if (isSuspectedActivity != null)
|
363
|
+ if (isWorkoutRecovery != null) {
|
|
|
|
364
|
+ val['is_workout_recovery'] = isWorkoutRecovery;
|
|
|
|
365
|
+ }
|
|
|
|
366
|
+ if (isSleepLikely != null) val['is_sleep_likely'] = isSleepLikely;
|
|
|
|
367
|
+ if (isSuspectedActivity != null) {
|
|
360
|
val['is_suspected_activity'] = isSuspectedActivity;
|
368
|
val['is_suspected_activity'] = isSuspectedActivity;
|
|
|
|
369
|
+ }
|
|
361
|
if (isMoving != null) val['is_moving'] = isMoving;
|
370
|
if (isMoving != null) val['is_moving'] = isMoving;
|
|
362
|
if (isAsleep != null) val['is_asleep'] = isAsleep;
|
371
|
if (isAsleep != null) val['is_asleep'] = isAsleep;
|
|
363
|
return val;
|
372
|
return val;
|