|
@@ -15,21 +15,22 @@ PlatformException _createConnectionError(String channelName) { |
|
@@ -15,21 +15,22 @@ PlatformException _createConnectionError(String channelName) { |
|
15
|
message: 'Unable to establish connection on channel: "$channelName".',
|
15
|
message: 'Unable to establish connection on channel: "$channelName".',
|
|
16
|
);
|
16
|
);
|
|
17
|
}
|
17
|
}
|
|
|
|
18
|
+
|
|
18
|
bool _deepEquals(Object? a, Object? b) {
|
19
|
bool _deepEquals(Object? a, Object? b) {
|
|
19
|
if (a is List && b is List) {
|
20
|
if (a is List && b is List) {
|
|
20
|
return a.length == b.length &&
|
21
|
return a.length == b.length &&
|
|
21
|
a.indexed
|
22
|
a.indexed
|
|
22
|
- .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
|
23
|
+ .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
|
|
23
|
}
|
24
|
}
|
|
24
|
if (a is Map && b is Map) {
|
25
|
if (a is Map && b is Map) {
|
|
25
|
- return a.length == b.length && a.entries.every((MapEntry<Object?, Object?> entry) =>
|
|
|
|
26
|
- (b as Map<Object?, Object?>).containsKey(entry.key) &&
|
|
|
|
27
|
- _deepEquals(entry.value, b[entry.key]));
|
26
|
+ return a.length == b.length &&
|
|
|
|
27
|
+ a.entries.every((MapEntry<Object?, Object?> entry) =>
|
|
|
|
28
|
+ (b as Map<Object?, Object?>).containsKey(entry.key) &&
|
|
|
|
29
|
+ _deepEquals(entry.value, b[entry.key]));
|
|
28
|
}
|
30
|
}
|
|
29
|
return a == b;
|
31
|
return a == b;
|
|
30
|
}
|
32
|
}
|
|
31
|
|
33
|
|
|
32
|
-
|
|
|
|
33
|
class HealthKitRawDataPoint {
|
34
|
class HealthKitRawDataPoint {
|
|
34
|
HealthKitRawDataPoint({
|
35
|
HealthKitRawDataPoint({
|
|
35
|
required this.dataType,
|
36
|
required this.dataType,
|
|
@@ -60,7 +61,8 @@ class HealthKitRawDataPoint { |
|
@@ -60,7 +61,8 @@ class HealthKitRawDataPoint { |
|
60
|
}
|
61
|
}
|
|
61
|
|
62
|
|
|
62
|
Object encode() {
|
63
|
Object encode() {
|
|
63
|
- return _toList(); }
|
64
|
+ return _toList();
|
|
|
|
65
|
+ }
|
|
64
|
|
66
|
|
|
65
|
static HealthKitRawDataPoint decode(Object result) {
|
67
|
static HealthKitRawDataPoint decode(Object result) {
|
|
66
|
result as List<Object?>;
|
68
|
result as List<Object?>;
|
|
@@ -87,8 +89,7 @@ class HealthKitRawDataPoint { |
|
@@ -87,8 +89,7 @@ class HealthKitRawDataPoint { |
|
87
|
|
89
|
|
|
88
|
@override
|
90
|
@override
|
|
89
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
91
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
90
|
- int get hashCode => Object.hashAll(_toList())
|
|
|
|
91
|
-;
|
92
|
+ int get hashCode => Object.hashAll(_toList());
|
|
92
|
}
|
93
|
}
|
|
93
|
|
94
|
|
|
94
|
class HealthKitRawSleepDataPoint {
|
95
|
class HealthKitRawSleepDataPoint {
|
|
@@ -109,20 +110,23 @@ class HealthKitRawSleepDataPoint { |
|
@@ -109,20 +110,23 @@ class HealthKitRawSleepDataPoint { |
|
109
|
}
|
110
|
}
|
|
110
|
|
111
|
|
|
111
|
Object encode() {
|
112
|
Object encode() {
|
|
112
|
- return _toList(); }
|
113
|
+ return _toList();
|
|
|
|
114
|
+ }
|
|
113
|
|
115
|
|
|
114
|
static HealthKitRawSleepDataPoint decode(Object result) {
|
116
|
static HealthKitRawSleepDataPoint decode(Object result) {
|
|
115
|
result as List<Object?>;
|
117
|
result as List<Object?>;
|
|
116
|
return HealthKitRawSleepDataPoint(
|
118
|
return HealthKitRawSleepDataPoint(
|
|
117
|
dataType: result[0]! as int,
|
119
|
dataType: result[0]! as int,
|
|
118
|
- sleepDataPoints: (result[1] as List<Object?>?)!.cast<HealthKitRawDataPoint>(),
|
120
|
+ sleepDataPoints:
|
|
|
|
121
|
+ (result[1] as List<Object?>?)!.cast<HealthKitRawDataPoint>(),
|
|
119
|
);
|
122
|
);
|
|
120
|
}
|
123
|
}
|
|
121
|
|
124
|
|
|
122
|
@override
|
125
|
@override
|
|
123
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
126
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
124
|
bool operator ==(Object other) {
|
127
|
bool operator ==(Object other) {
|
|
125
|
- if (other is! HealthKitRawSleepDataPoint || other.runtimeType != runtimeType) {
|
128
|
+ if (other is! HealthKitRawSleepDataPoint ||
|
|
|
|
129
|
+ other.runtimeType != runtimeType) {
|
|
126
|
return false;
|
130
|
return false;
|
|
127
|
}
|
131
|
}
|
|
128
|
if (identical(this, other)) {
|
132
|
if (identical(this, other)) {
|
|
@@ -133,8 +137,7 @@ class HealthKitRawSleepDataPoint { |
|
@@ -133,8 +137,7 @@ class HealthKitRawSleepDataPoint { |
|
133
|
|
137
|
|
|
134
|
@override
|
138
|
@override
|
|
135
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
139
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
136
|
- int get hashCode => Object.hashAll(_toList())
|
|
|
|
137
|
-;
|
140
|
+ int get hashCode => Object.hashAll(_toList());
|
|
138
|
}
|
141
|
}
|
|
139
|
|
142
|
|
|
140
|
class HealthKitRawWorkoutDataPoint {
|
143
|
class HealthKitRawWorkoutDataPoint {
|
|
@@ -159,7 +162,8 @@ class HealthKitRawWorkoutDataPoint { |
|
@@ -159,7 +162,8 @@ class HealthKitRawWorkoutDataPoint { |
|
159
|
}
|
162
|
}
|
|
160
|
|
163
|
|
|
161
|
Object encode() {
|
164
|
Object encode() {
|
|
162
|
- return _toList(); }
|
165
|
+ return _toList();
|
|
|
|
166
|
+ }
|
|
163
|
|
167
|
|
|
164
|
static HealthKitRawWorkoutDataPoint decode(Object result) {
|
168
|
static HealthKitRawWorkoutDataPoint decode(Object result) {
|
|
165
|
result as List<Object?>;
|
169
|
result as List<Object?>;
|
|
@@ -173,7 +177,8 @@ class HealthKitRawWorkoutDataPoint { |
|
@@ -173,7 +177,8 @@ class HealthKitRawWorkoutDataPoint { |
|
173
|
@override
|
177
|
@override
|
|
174
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
178
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
175
|
bool operator ==(Object other) {
|
179
|
bool operator ==(Object other) {
|
|
176
|
- if (other is! HealthKitRawWorkoutDataPoint || other.runtimeType != runtimeType) {
|
180
|
+ if (other is! HealthKitRawWorkoutDataPoint ||
|
|
|
|
181
|
+ other.runtimeType != runtimeType) {
|
|
177
|
return false;
|
182
|
return false;
|
|
178
|
}
|
183
|
}
|
|
179
|
if (identical(this, other)) {
|
184
|
if (identical(this, other)) {
|
|
@@ -184,8 +189,7 @@ class HealthKitRawWorkoutDataPoint { |
|
@@ -184,8 +189,7 @@ class HealthKitRawWorkoutDataPoint { |
|
184
|
|
189
|
|
|
185
|
@override
|
190
|
@override
|
|
186
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
191
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
187
|
- int get hashCode => Object.hashAll(_toList())
|
|
|
|
188
|
-;
|
192
|
+ int get hashCode => Object.hashAll(_toList());
|
|
189
|
}
|
193
|
}
|
|
190
|
|
194
|
|
|
191
|
class HealthKitRawMotionDataPoint {
|
195
|
class HealthKitRawMotionDataPoint {
|
|
@@ -210,7 +214,8 @@ class HealthKitRawMotionDataPoint { |
|
@@ -210,7 +214,8 @@ class HealthKitRawMotionDataPoint { |
|
210
|
}
|
214
|
}
|
|
211
|
|
215
|
|
|
212
|
Object encode() {
|
216
|
Object encode() {
|
|
213
|
- return _toList(); }
|
217
|
+ return _toList();
|
|
|
|
218
|
+ }
|
|
214
|
|
219
|
|
|
215
|
static HealthKitRawMotionDataPoint decode(Object result) {
|
220
|
static HealthKitRawMotionDataPoint decode(Object result) {
|
|
216
|
result as List<Object?>;
|
221
|
result as List<Object?>;
|
|
@@ -224,7 +229,8 @@ class HealthKitRawMotionDataPoint { |
|
@@ -224,7 +229,8 @@ class HealthKitRawMotionDataPoint { |
|
224
|
@override
|
229
|
@override
|
|
225
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
230
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
226
|
bool operator ==(Object other) {
|
231
|
bool operator ==(Object other) {
|
|
227
|
- if (other is! HealthKitRawMotionDataPoint || other.runtimeType != runtimeType) {
|
232
|
+ if (other is! HealthKitRawMotionDataPoint ||
|
|
|
|
233
|
+ other.runtimeType != runtimeType) {
|
|
228
|
return false;
|
234
|
return false;
|
|
229
|
}
|
235
|
}
|
|
230
|
if (identical(this, other)) {
|
236
|
if (identical(this, other)) {
|
|
@@ -235,8 +241,7 @@ class HealthKitRawMotionDataPoint { |
|
@@ -235,8 +241,7 @@ class HealthKitRawMotionDataPoint { |
|
235
|
|
241
|
|
|
236
|
@override
|
242
|
@override
|
|
237
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
243
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
238
|
- int get hashCode => Object.hashAll(_toList())
|
|
|
|
239
|
-;
|
244
|
+ int get hashCode => Object.hashAll(_toList());
|
|
240
|
}
|
245
|
}
|
|
241
|
|
246
|
|
|
242
|
class HealthKitRawActivityDataPoint {
|
247
|
class HealthKitRawActivityDataPoint {
|
|
@@ -289,7 +294,8 @@ class HealthKitRawActivityDataPoint { |
|
@@ -289,7 +294,8 @@ class HealthKitRawActivityDataPoint { |
|
289
|
}
|
294
|
}
|
|
290
|
|
295
|
|
|
291
|
Object encode() {
|
296
|
Object encode() {
|
|
292
|
- return _toList(); }
|
297
|
+ return _toList();
|
|
|
|
298
|
+ }
|
|
293
|
|
299
|
|
|
294
|
static HealthKitRawActivityDataPoint decode(Object result) {
|
300
|
static HealthKitRawActivityDataPoint decode(Object result) {
|
|
295
|
result as List<Object?>;
|
301
|
result as List<Object?>;
|
|
@@ -310,7 +316,8 @@ class HealthKitRawActivityDataPoint { |
|
@@ -310,7 +316,8 @@ class HealthKitRawActivityDataPoint { |
|
310
|
@override
|
316
|
@override
|
|
311
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
317
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
312
|
bool operator ==(Object other) {
|
318
|
bool operator ==(Object other) {
|
|
313
|
- if (other is! HealthKitRawActivityDataPoint || other.runtimeType != runtimeType) {
|
319
|
+ if (other is! HealthKitRawActivityDataPoint ||
|
|
|
|
320
|
+ other.runtimeType != runtimeType) {
|
|
314
|
return false;
|
321
|
return false;
|
|
315
|
}
|
322
|
}
|
|
316
|
if (identical(this, other)) {
|
323
|
if (identical(this, other)) {
|
|
@@ -321,11 +328,9 @@ class HealthKitRawActivityDataPoint { |
|
@@ -321,11 +328,9 @@ class HealthKitRawActivityDataPoint { |
|
321
|
|
328
|
|
|
322
|
@override
|
329
|
@override
|
|
323
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
330
|
// ignore: avoid_equals_and_hash_code_on_mutable_classes
|
|
324
|
- int get hashCode => Object.hashAll(_toList())
|
|
|
|
325
|
-;
|
331
|
+ int get hashCode => Object.hashAll(_toList());
|
|
326
|
}
|
332
|
}
|
|
327
|
|
333
|
|
|
328
|
-
|
|
|
|
329
|
class _PigeonCodec extends StandardMessageCodec {
|
334
|
class _PigeonCodec extends StandardMessageCodec {
|
|
330
|
const _PigeonCodec();
|
335
|
const _PigeonCodec();
|
|
331
|
@override
|
336
|
@override
|
|
@@ -333,19 +338,19 @@ class _PigeonCodec extends StandardMessageCodec { |
|
@@ -333,19 +338,19 @@ class _PigeonCodec extends StandardMessageCodec { |
|
333
|
if (value is int) {
|
338
|
if (value is int) {
|
|
334
|
buffer.putUint8(4);
|
339
|
buffer.putUint8(4);
|
|
335
|
buffer.putInt64(value);
|
340
|
buffer.putInt64(value);
|
|
336
|
- } else if (value is HealthKitRawDataPoint) {
|
341
|
+ } else if (value is HealthKitRawDataPoint) {
|
|
337
|
buffer.putUint8(129);
|
342
|
buffer.putUint8(129);
|
|
338
|
writeValue(buffer, value.encode());
|
343
|
writeValue(buffer, value.encode());
|
|
339
|
- } else if (value is HealthKitRawSleepDataPoint) {
|
344
|
+ } else if (value is HealthKitRawSleepDataPoint) {
|
|
340
|
buffer.putUint8(130);
|
345
|
buffer.putUint8(130);
|
|
341
|
writeValue(buffer, value.encode());
|
346
|
writeValue(buffer, value.encode());
|
|
342
|
- } else if (value is HealthKitRawWorkoutDataPoint) {
|
347
|
+ } else if (value is HealthKitRawWorkoutDataPoint) {
|
|
343
|
buffer.putUint8(131);
|
348
|
buffer.putUint8(131);
|
|
344
|
writeValue(buffer, value.encode());
|
349
|
writeValue(buffer, value.encode());
|
|
345
|
- } else if (value is HealthKitRawMotionDataPoint) {
|
350
|
+ } else if (value is HealthKitRawMotionDataPoint) {
|
|
346
|
buffer.putUint8(132);
|
351
|
buffer.putUint8(132);
|
|
347
|
writeValue(buffer, value.encode());
|
352
|
writeValue(buffer, value.encode());
|
|
348
|
- } else if (value is HealthKitRawActivityDataPoint) {
|
353
|
+ } else if (value is HealthKitRawActivityDataPoint) {
|
|
349
|
buffer.putUint8(133);
|
354
|
buffer.putUint8(133);
|
|
350
|
writeValue(buffer, value.encode());
|
355
|
writeValue(buffer, value.encode());
|
|
351
|
} else {
|
356
|
} else {
|
|
@@ -356,15 +361,15 @@ class _PigeonCodec extends StandardMessageCodec { |
|
@@ -356,15 +361,15 @@ class _PigeonCodec extends StandardMessageCodec { |
|
356
|
@override
|
361
|
@override
|
|
357
|
Object? readValueOfType(int type, ReadBuffer buffer) {
|
362
|
Object? readValueOfType(int type, ReadBuffer buffer) {
|
|
358
|
switch (type) {
|
363
|
switch (type) {
|
|
359
|
- case 129:
|
364
|
+ case 129:
|
|
360
|
return HealthKitRawDataPoint.decode(readValue(buffer)!);
|
365
|
return HealthKitRawDataPoint.decode(readValue(buffer)!);
|
|
361
|
- case 130:
|
366
|
+ case 130:
|
|
362
|
return HealthKitRawSleepDataPoint.decode(readValue(buffer)!);
|
367
|
return HealthKitRawSleepDataPoint.decode(readValue(buffer)!);
|
|
363
|
- case 131:
|
368
|
+ case 131:
|
|
364
|
return HealthKitRawWorkoutDataPoint.decode(readValue(buffer)!);
|
369
|
return HealthKitRawWorkoutDataPoint.decode(readValue(buffer)!);
|
|
365
|
- case 132:
|
370
|
+ case 132:
|
|
366
|
return HealthKitRawMotionDataPoint.decode(readValue(buffer)!);
|
371
|
return HealthKitRawMotionDataPoint.decode(readValue(buffer)!);
|
|
367
|
- case 133:
|
372
|
+ case 133:
|
|
368
|
return HealthKitRawActivityDataPoint.decode(readValue(buffer)!);
|
373
|
return HealthKitRawActivityDataPoint.decode(readValue(buffer)!);
|
|
369
|
default:
|
374
|
default:
|
|
370
|
return super.readValueOfType(type, buffer);
|
375
|
return super.readValueOfType(type, buffer);
|
|
@@ -376,9 +381,11 @@ class HealthKitRawDataHostApi { |
|
@@ -376,9 +381,11 @@ class HealthKitRawDataHostApi { |
|
376
|
/// Constructor for [HealthKitRawDataHostApi]. The [binaryMessenger] named argument is
|
381
|
/// Constructor for [HealthKitRawDataHostApi]. The [binaryMessenger] named argument is
|
|
377
|
/// available for dependency injection. If it is left null, the default
|
382
|
/// available for dependency injection. If it is left null, the default
|
|
378
|
/// BinaryMessenger will be used which routes to the host platform.
|
383
|
/// BinaryMessenger will be used which routes to the host platform.
|
|
379
|
- HealthKitRawDataHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
|
384
|
+ HealthKitRawDataHostApi(
|
|
|
|
385
|
+ {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
|
|
380
|
: pigeonVar_binaryMessenger = binaryMessenger,
|
386
|
: pigeonVar_binaryMessenger = binaryMessenger,
|
|
381
|
- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
387
|
+ pigeonVar_messageChannelSuffix =
|
|
|
|
388
|
+ messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
382
|
final BinaryMessenger? pigeonVar_binaryMessenger;
|
389
|
final BinaryMessenger? pigeonVar_binaryMessenger;
|
|
383
|
|
390
|
|
|
384
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
391
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
@@ -387,8 +394,10 @@ class HealthKitRawDataHostApi { |
|
@@ -387,8 +394,10 @@ class HealthKitRawDataHostApi { |
|
387
|
|
394
|
|
|
388
|
/// 是否有AppleHealth数据
|
395
|
/// 是否有AppleHealth数据
|
|
389
|
Future<bool> hasHealthData() async {
|
396
|
Future<bool> hasHealthData() async {
|
|
390
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.hasHealthData$pigeonVar_messageChannelSuffix';
|
|
|
|
391
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
397
|
+ final String pigeonVar_channelName =
|
|
|
|
398
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.hasHealthData$pigeonVar_messageChannelSuffix';
|
|
|
|
399
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
400
|
+ BasicMessageChannel<Object?>(
|
|
392
|
pigeonVar_channelName,
|
401
|
pigeonVar_channelName,
|
|
393
|
pigeonChannelCodec,
|
402
|
pigeonChannelCodec,
|
|
394
|
binaryMessenger: pigeonVar_binaryMessenger,
|
403
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
@@ -415,14 +424,18 @@ class HealthKitRawDataHostApi { |
|
@@ -415,14 +424,18 @@ class HealthKitRawDataHostApi { |
|
415
|
}
|
424
|
}
|
|
416
|
|
425
|
|
|
417
|
/// 从AppleHealth 中读取原始数据
|
426
|
/// 从AppleHealth 中读取原始数据
|
|
418
|
- Future<List<HealthKitRawDataPoint>> getHealthKitRawData(int dataType, int startTime, int endTime) async {
|
|
|
|
419
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawData$pigeonVar_messageChannelSuffix';
|
|
|
|
420
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
427
|
+ Future<List<HealthKitRawDataPoint>> getHealthKitRawData(
|
|
|
|
428
|
+ int dataType, int startTime, int endTime) async {
|
|
|
|
429
|
+ final String pigeonVar_channelName =
|
|
|
|
430
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawData$pigeonVar_messageChannelSuffix';
|
|
|
|
431
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
432
|
+ BasicMessageChannel<Object?>(
|
|
421
|
pigeonVar_channelName,
|
433
|
pigeonVar_channelName,
|
|
422
|
pigeonChannelCodec,
|
434
|
pigeonChannelCodec,
|
|
423
|
binaryMessenger: pigeonVar_binaryMessenger,
|
435
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
424
|
);
|
436
|
);
|
|
425
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[dataType, startTime, endTime]);
|
437
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
438
|
+ pigeonVar_channel.send(<Object?>[dataType, startTime, endTime]);
|
|
426
|
final List<Object?>? pigeonVar_replyList =
|
439
|
final List<Object?>? pigeonVar_replyList =
|
|
427
|
await pigeonVar_sendFuture as List<Object?>?;
|
440
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
428
|
if (pigeonVar_replyList == null) {
|
441
|
if (pigeonVar_replyList == null) {
|
|
@@ -439,14 +452,17 @@ class HealthKitRawDataHostApi { |
|
@@ -439,14 +452,17 @@ class HealthKitRawDataHostApi { |
|
439
|
message: 'Host platform returned null value for non-null return value.',
|
452
|
message: 'Host platform returned null value for non-null return value.',
|
|
440
|
);
|
453
|
);
|
|
441
|
} else {
|
454
|
} else {
|
|
442
|
- return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthKitRawDataPoint>();
|
455
|
+ return (pigeonVar_replyList[0] as List<Object?>?)!
|
|
|
|
456
|
+ .cast<HealthKitRawDataPoint>();
|
|
443
|
}
|
457
|
}
|
|
444
|
}
|
458
|
}
|
|
445
|
|
459
|
|
|
446
|
/// 原生数据上传
|
460
|
/// 原生数据上传
|
|
447
|
Future<bool> performHealthDataUpload() async {
|
461
|
Future<bool> performHealthDataUpload() async {
|
|
448
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performHealthDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
449
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
462
|
+ final String pigeonVar_channelName =
|
|
|
|
463
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performHealthDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
464
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
465
|
+ BasicMessageChannel<Object?>(
|
|
450
|
pigeonVar_channelName,
|
466
|
pigeonVar_channelName,
|
|
451
|
pigeonChannelCodec,
|
467
|
pigeonChannelCodec,
|
|
452
|
binaryMessenger: pigeonVar_binaryMessenger,
|
468
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
@@ -473,14 +489,27 @@ class HealthKitRawDataHostApi { |
|
@@ -473,14 +489,27 @@ class HealthKitRawDataHostApi { |
|
473
|
}
|
489
|
}
|
|
474
|
|
490
|
|
|
475
|
/// 向原生同步数据库路径
|
491
|
/// 向原生同步数据库路径
|
|
476
|
- Future<bool> syncDatabase({required String hrDataPath, required String hrvDataPath, required String sleepDataPath, required String avgRealtimeStressDataPath, }) async {
|
|
|
|
477
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.syncDatabase$pigeonVar_messageChannelSuffix';
|
|
|
|
478
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
492
|
+ Future<bool> syncDatabase({
|
|
|
|
493
|
+ required String hrDataPath,
|
|
|
|
494
|
+ required String hrvDataPath,
|
|
|
|
495
|
+ required String sleepDataPath,
|
|
|
|
496
|
+ required String avgRealtimeStressDataPath,
|
|
|
|
497
|
+ }) async {
|
|
|
|
498
|
+ final String pigeonVar_channelName =
|
|
|
|
499
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.syncDatabase$pigeonVar_messageChannelSuffix';
|
|
|
|
500
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
501
|
+ BasicMessageChannel<Object?>(
|
|
479
|
pigeonVar_channelName,
|
502
|
pigeonVar_channelName,
|
|
480
|
pigeonChannelCodec,
|
503
|
pigeonChannelCodec,
|
|
481
|
binaryMessenger: pigeonVar_binaryMessenger,
|
504
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
482
|
);
|
505
|
);
|
|
483
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[hrDataPath, hrvDataPath, sleepDataPath, avgRealtimeStressDataPath]);
|
506
|
+ final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel
|
|
|
|
507
|
+ .send(<Object?>[
|
|
|
|
508
|
+ hrDataPath,
|
|
|
|
509
|
+ hrvDataPath,
|
|
|
|
510
|
+ sleepDataPath,
|
|
|
|
511
|
+ avgRealtimeStressDataPath
|
|
|
|
512
|
+ ]);
|
|
484
|
final List<Object?>? pigeonVar_replyList =
|
513
|
final List<Object?>? pigeonVar_replyList =
|
|
485
|
await pigeonVar_sendFuture as List<Object?>?;
|
514
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
486
|
if (pigeonVar_replyList == null) {
|
515
|
if (pigeonVar_replyList == null) {
|
|
@@ -503,13 +532,16 @@ class HealthKitRawDataHostApi { |
|
@@ -503,13 +532,16 @@ class HealthKitRawDataHostApi { |
|
503
|
|
532
|
|
|
504
|
/// 上传心率 - 实时压力数据, 返回上传截止的时间戳, 方便flutter修改数据库
|
533
|
/// 上传心率 - 实时压力数据, 返回上传截止的时间戳, 方便flutter修改数据库
|
|
505
|
Future<int> performHRDataUpload({required String sqliteFilePath}) async {
|
534
|
Future<int> performHRDataUpload({required String sqliteFilePath}) async {
|
|
506
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performHRDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
507
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
535
|
+ final String pigeonVar_channelName =
|
|
|
|
536
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performHRDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
537
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
538
|
+ BasicMessageChannel<Object?>(
|
|
508
|
pigeonVar_channelName,
|
539
|
pigeonVar_channelName,
|
|
509
|
pigeonChannelCodec,
|
540
|
pigeonChannelCodec,
|
|
510
|
binaryMessenger: pigeonVar_binaryMessenger,
|
541
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
511
|
);
|
542
|
);
|
|
512
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
543
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
544
|
+ pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
|
513
|
final List<Object?>? pigeonVar_replyList =
|
545
|
final List<Object?>? pigeonVar_replyList =
|
|
514
|
await pigeonVar_sendFuture as List<Object?>?;
|
546
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
515
|
if (pigeonVar_replyList == null) {
|
547
|
if (pigeonVar_replyList == null) {
|
|
@@ -532,13 +564,16 @@ class HealthKitRawDataHostApi { |
|
@@ -532,13 +564,16 @@ class HealthKitRawDataHostApi { |
|
532
|
|
564
|
|
|
533
|
/// 上传HRV - HRV压力数据, 返回上传截止的时间戳,方便flutter 修改数据库
|
565
|
/// 上传HRV - HRV压力数据, 返回上传截止的时间戳,方便flutter 修改数据库
|
|
534
|
Future<int> performHRVDataUpload({required String sqliteFilePath}) async {
|
566
|
Future<int> performHRVDataUpload({required String sqliteFilePath}) async {
|
|
535
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performHRVDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
536
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
567
|
+ final String pigeonVar_channelName =
|
|
|
|
568
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performHRVDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
569
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
570
|
+ BasicMessageChannel<Object?>(
|
|
537
|
pigeonVar_channelName,
|
571
|
pigeonVar_channelName,
|
|
538
|
pigeonChannelCodec,
|
572
|
pigeonChannelCodec,
|
|
539
|
binaryMessenger: pigeonVar_binaryMessenger,
|
573
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
540
|
);
|
574
|
);
|
|
541
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
575
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
576
|
+ pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
|
542
|
final List<Object?>? pigeonVar_replyList =
|
577
|
final List<Object?>? pigeonVar_replyList =
|
|
543
|
await pigeonVar_sendFuture as List<Object?>?;
|
578
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
544
|
if (pigeonVar_replyList == null) {
|
579
|
if (pigeonVar_replyList == null) {
|
|
@@ -560,14 +595,18 @@ class HealthKitRawDataHostApi { |
|
@@ -560,14 +595,18 @@ class HealthKitRawDataHostApi { |
|
560
|
}
|
595
|
}
|
|
561
|
|
596
|
|
|
562
|
/// 上传睡眠统计数据
|
597
|
/// 上传睡眠统计数据
|
|
563
|
- Future<int> performSleepAnalysisDataUpload({required String sqliteFilePath}) async {
|
|
|
|
564
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performSleepAnalysisDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
565
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
598
|
+ Future<int> performSleepAnalysisDataUpload(
|
|
|
|
599
|
+ {required String sqliteFilePath}) async {
|
|
|
|
600
|
+ final String pigeonVar_channelName =
|
|
|
|
601
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performSleepAnalysisDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
602
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
603
|
+ BasicMessageChannel<Object?>(
|
|
566
|
pigeonVar_channelName,
|
604
|
pigeonVar_channelName,
|
|
567
|
pigeonChannelCodec,
|
605
|
pigeonChannelCodec,
|
|
568
|
binaryMessenger: pigeonVar_binaryMessenger,
|
606
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
569
|
);
|
607
|
);
|
|
570
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
608
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
609
|
+ pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
|
571
|
final List<Object?>? pigeonVar_replyList =
|
610
|
final List<Object?>? pigeonVar_replyList =
|
|
572
|
await pigeonVar_sendFuture as List<Object?>?;
|
611
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
573
|
if (pigeonVar_replyList == null) {
|
612
|
if (pigeonVar_replyList == null) {
|
|
@@ -589,14 +628,18 @@ class HealthKitRawDataHostApi { |
|
@@ -589,14 +628,18 @@ class HealthKitRawDataHostApi { |
|
589
|
}
|
628
|
}
|
|
590
|
|
629
|
|
|
591
|
/// 上传当前实时压力(统计维度是当天)
|
630
|
/// 上传当前实时压力(统计维度是当天)
|
|
592
|
- Future<int> performAvgRealtimeStressDataUpload({required String sqliteFilePath}) async {
|
|
|
|
593
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performAvgRealtimeStressDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
594
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
631
|
+ Future<int> performAvgRealtimeStressDataUpload(
|
|
|
|
632
|
+ {required String sqliteFilePath}) async {
|
|
|
|
633
|
+ final String pigeonVar_channelName =
|
|
|
|
634
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.performAvgRealtimeStressDataUpload$pigeonVar_messageChannelSuffix';
|
|
|
|
635
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
636
|
+ BasicMessageChannel<Object?>(
|
|
595
|
pigeonVar_channelName,
|
637
|
pigeonVar_channelName,
|
|
596
|
pigeonChannelCodec,
|
638
|
pigeonChannelCodec,
|
|
597
|
binaryMessenger: pigeonVar_binaryMessenger,
|
639
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
598
|
);
|
640
|
);
|
|
599
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
641
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
642
|
+ pigeonVar_channel.send(<Object?>[sqliteFilePath]);
|
|
600
|
final List<Object?>? pigeonVar_replyList =
|
643
|
final List<Object?>? pigeonVar_replyList =
|
|
601
|
await pigeonVar_sendFuture as List<Object?>?;
|
644
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
602
|
if (pigeonVar_replyList == null) {
|
645
|
if (pigeonVar_replyList == null) {
|
|
@@ -618,14 +661,18 @@ class HealthKitRawDataHostApi { |
|
@@ -618,14 +661,18 @@ class HealthKitRawDataHostApi { |
|
618
|
}
|
661
|
}
|
|
619
|
|
662
|
|
|
620
|
/// 从从AppleHealth中读取睡眠数据
|
663
|
/// 从从AppleHealth中读取睡眠数据
|
|
621
|
- Future<List<HealthKitRawSleepDataPoint>> getHealthKitRawSleepData(int startTime, int endTime) async {
|
|
|
|
622
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawSleepData$pigeonVar_messageChannelSuffix';
|
|
|
|
623
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
664
|
+ Future<List<HealthKitRawSleepDataPoint>> getHealthKitRawSleepData(
|
|
|
|
665
|
+ int startTime, int endTime) async {
|
|
|
|
666
|
+ final String pigeonVar_channelName =
|
|
|
|
667
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawSleepData$pigeonVar_messageChannelSuffix';
|
|
|
|
668
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
669
|
+ BasicMessageChannel<Object?>(
|
|
624
|
pigeonVar_channelName,
|
670
|
pigeonVar_channelName,
|
|
625
|
pigeonChannelCodec,
|
671
|
pigeonChannelCodec,
|
|
626
|
binaryMessenger: pigeonVar_binaryMessenger,
|
672
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
627
|
);
|
673
|
);
|
|
628
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]);
|
674
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
675
|
+ pigeonVar_channel.send(<Object?>[startTime, endTime]);
|
|
629
|
final List<Object?>? pigeonVar_replyList =
|
676
|
final List<Object?>? pigeonVar_replyList =
|
|
630
|
await pigeonVar_sendFuture as List<Object?>?;
|
677
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
631
|
if (pigeonVar_replyList == null) {
|
678
|
if (pigeonVar_replyList == null) {
|
|
@@ -642,19 +689,24 @@ class HealthKitRawDataHostApi { |
|
@@ -642,19 +689,24 @@ class HealthKitRawDataHostApi { |
|
642
|
message: 'Host platform returned null value for non-null return value.',
|
689
|
message: 'Host platform returned null value for non-null return value.',
|
|
643
|
);
|
690
|
);
|
|
644
|
} else {
|
691
|
} else {
|
|
645
|
- return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthKitRawSleepDataPoint>();
|
692
|
+ return (pigeonVar_replyList[0] as List<Object?>?)!
|
|
|
|
693
|
+ .cast<HealthKitRawSleepDataPoint>();
|
|
646
|
}
|
694
|
}
|
|
647
|
}
|
695
|
}
|
|
648
|
|
696
|
|
|
649
|
/// 从从AppleHealth中读取活动统计数据
|
697
|
/// 从从AppleHealth中读取活动统计数据
|
|
650
|
- Future<List<HealthKitRawActivityDataPoint>> getHealthKitRawActivityData(int startTime, int endTime) async {
|
|
|
|
651
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawActivityData$pigeonVar_messageChannelSuffix';
|
|
|
|
652
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
698
|
+ Future<List<HealthKitRawActivityDataPoint>> getHealthKitRawActivityData(
|
|
|
|
699
|
+ int startTime, int endTime) async {
|
|
|
|
700
|
+ final String pigeonVar_channelName =
|
|
|
|
701
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawActivityData$pigeonVar_messageChannelSuffix';
|
|
|
|
702
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
703
|
+ BasicMessageChannel<Object?>(
|
|
653
|
pigeonVar_channelName,
|
704
|
pigeonVar_channelName,
|
|
654
|
pigeonChannelCodec,
|
705
|
pigeonChannelCodec,
|
|
655
|
binaryMessenger: pigeonVar_binaryMessenger,
|
706
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
656
|
);
|
707
|
);
|
|
657
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]);
|
708
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
709
|
+ pigeonVar_channel.send(<Object?>[startTime, endTime]);
|
|
658
|
final List<Object?>? pigeonVar_replyList =
|
710
|
final List<Object?>? pigeonVar_replyList =
|
|
659
|
await pigeonVar_sendFuture as List<Object?>?;
|
711
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
660
|
if (pigeonVar_replyList == null) {
|
712
|
if (pigeonVar_replyList == null) {
|
|
@@ -671,19 +723,24 @@ class HealthKitRawDataHostApi { |
|
@@ -671,19 +723,24 @@ class HealthKitRawDataHostApi { |
|
671
|
message: 'Host platform returned null value for non-null return value.',
|
723
|
message: 'Host platform returned null value for non-null return value.',
|
|
672
|
);
|
724
|
);
|
|
673
|
} else {
|
725
|
} else {
|
|
674
|
- return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthKitRawActivityDataPoint>();
|
726
|
+ return (pigeonVar_replyList[0] as List<Object?>?)!
|
|
|
|
727
|
+ .cast<HealthKitRawActivityDataPoint>();
|
|
675
|
}
|
728
|
}
|
|
676
|
}
|
729
|
}
|
|
677
|
|
730
|
|
|
678
|
/// 从从AppleHealth中读取锻炼数据
|
731
|
/// 从从AppleHealth中读取锻炼数据
|
|
679
|
- Future<List<HealthKitRawWorkoutDataPoint>> getHealthKitRawWorkoutData(int startTime, int endTime) async {
|
|
|
|
680
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawWorkoutData$pigeonVar_messageChannelSuffix';
|
|
|
|
681
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
732
|
+ Future<List<HealthKitRawWorkoutDataPoint>> getHealthKitRawWorkoutData(
|
|
|
|
733
|
+ int startTime, int endTime) async {
|
|
|
|
734
|
+ final String pigeonVar_channelName =
|
|
|
|
735
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.getHealthKitRawWorkoutData$pigeonVar_messageChannelSuffix';
|
|
|
|
736
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
737
|
+ BasicMessageChannel<Object?>(
|
|
682
|
pigeonVar_channelName,
|
738
|
pigeonVar_channelName,
|
|
683
|
pigeonChannelCodec,
|
739
|
pigeonChannelCodec,
|
|
684
|
binaryMessenger: pigeonVar_binaryMessenger,
|
740
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
685
|
);
|
741
|
);
|
|
686
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]);
|
742
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
743
|
+ pigeonVar_channel.send(<Object?>[startTime, endTime]);
|
|
687
|
final List<Object?>? pigeonVar_replyList =
|
744
|
final List<Object?>? pigeonVar_replyList =
|
|
688
|
await pigeonVar_sendFuture as List<Object?>?;
|
745
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
689
|
if (pigeonVar_replyList == null) {
|
746
|
if (pigeonVar_replyList == null) {
|
|
@@ -700,20 +757,25 @@ class HealthKitRawDataHostApi { |
|
@@ -700,20 +757,25 @@ class HealthKitRawDataHostApi { |
|
700
|
message: 'Host platform returned null value for non-null return value.',
|
757
|
message: 'Host platform returned null value for non-null return value.',
|
|
701
|
);
|
758
|
);
|
|
702
|
} else {
|
759
|
} else {
|
|
703
|
- return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthKitRawWorkoutDataPoint>();
|
760
|
+ return (pigeonVar_replyList[0] as List<Object?>?)!
|
|
|
|
761
|
+ .cast<HealthKitRawWorkoutDataPoint>();
|
|
704
|
}
|
762
|
}
|
|
705
|
}
|
763
|
}
|
|
706
|
|
764
|
|
|
707
|
/// 原生是否通知了flutter ,apple health数据变化,让native 记录这次调用记录
|
765
|
/// 原生是否通知了flutter ,apple health数据变化,让native 记录这次调用记录
|
|
708
|
/// 需要保存引起此次计算的数据变化类型列表、当前时间
|
766
|
/// 需要保存引起此次计算的数据变化类型列表、当前时间
|
|
709
|
- Future<bool> saveNativeCallFlutterChange({List<int> relativeDataTypes}) async {
|
|
|
|
710
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.saveNativeCallFlutterChange$pigeonVar_messageChannelSuffix';
|
|
|
|
711
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
767
|
+ Future<bool> saveNativeCallFlutterChange(
|
|
|
|
768
|
+ {required List<int> relativeDataTypes}) async {
|
|
|
|
769
|
+ final String pigeonVar_channelName =
|
|
|
|
770
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.saveNativeCallFlutterChange$pigeonVar_messageChannelSuffix';
|
|
|
|
771
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
772
|
+ BasicMessageChannel<Object?>(
|
|
712
|
pigeonVar_channelName,
|
773
|
pigeonVar_channelName,
|
|
713
|
pigeonChannelCodec,
|
774
|
pigeonChannelCodec,
|
|
714
|
binaryMessenger: pigeonVar_binaryMessenger,
|
775
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
715
|
);
|
776
|
);
|
|
716
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[relativeDataTypes]);
|
777
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
778
|
+ pigeonVar_channel.send(<Object?>[relativeDataTypes]);
|
|
717
|
final List<Object?>? pigeonVar_replyList =
|
779
|
final List<Object?>? pigeonVar_replyList =
|
|
718
|
await pigeonVar_sendFuture as List<Object?>?;
|
780
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
719
|
if (pigeonVar_replyList == null) {
|
781
|
if (pigeonVar_replyList == null) {
|
|
@@ -736,14 +798,18 @@ class HealthKitRawDataHostApi { |
|
@@ -736,14 +798,18 @@ class HealthKitRawDataHostApi { |
|
736
|
|
798
|
|
|
737
|
/// caculate 一旦完成,让native 存储这次的计算记录
|
799
|
/// caculate 一旦完成,让native 存储这次的计算记录
|
|
738
|
/// 需要保存引起此次计算的数据变化类型列表、当前时间
|
800
|
/// 需要保存引起此次计算的数据变化类型列表、当前时间
|
|
739
|
- Future<bool> saveFlutterCaculateFinished({List<int> relativeDataTypes}) async {
|
|
|
|
740
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.saveFlutterCaculateFinished$pigeonVar_messageChannelSuffix';
|
|
|
|
741
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
801
|
+ Future<bool> saveFlutterCaculateFinished(
|
|
|
|
802
|
+ {required List<int> relativeDataTypes}) async {
|
|
|
|
803
|
+ final String pigeonVar_channelName =
|
|
|
|
804
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.saveFlutterCaculateFinished$pigeonVar_messageChannelSuffix';
|
|
|
|
805
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
806
|
+ BasicMessageChannel<Object?>(
|
|
742
|
pigeonVar_channelName,
|
807
|
pigeonVar_channelName,
|
|
743
|
pigeonChannelCodec,
|
808
|
pigeonChannelCodec,
|
|
744
|
binaryMessenger: pigeonVar_binaryMessenger,
|
809
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
745
|
);
|
810
|
);
|
|
746
|
- final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[relativeDataTypes]);
|
811
|
+ final Future<Object?> pigeonVar_sendFuture =
|
|
|
|
812
|
+ pigeonVar_channel.send(<Object?>[relativeDataTypes]);
|
|
747
|
final List<Object?>? pigeonVar_replyList =
|
813
|
final List<Object?>? pigeonVar_replyList =
|
|
748
|
await pigeonVar_sendFuture as List<Object?>?;
|
814
|
await pigeonVar_sendFuture as List<Object?>?;
|
|
749
|
if (pigeonVar_replyList == null) {
|
815
|
if (pigeonVar_replyList == null) {
|
|
@@ -766,8 +832,10 @@ class HealthKitRawDataHostApi { |
|
@@ -766,8 +832,10 @@ class HealthKitRawDataHostApi { |
|
766
|
|
832
|
|
|
767
|
/// 让原生分享出来本地的记录文件
|
833
|
/// 让原生分享出来本地的记录文件
|
|
768
|
Future<bool> shareNativeAppleHealthObserverRecord() async {
|
834
|
Future<bool> shareNativeAppleHealthObserverRecord() async {
|
|
769
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.shareNativeAppleHealthObserverRecord$pigeonVar_messageChannelSuffix';
|
|
|
|
770
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
835
|
+ final String pigeonVar_channelName =
|
|
|
|
836
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.shareNativeAppleHealthObserverRecord$pigeonVar_messageChannelSuffix';
|
|
|
|
837
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
838
|
+ BasicMessageChannel<Object?>(
|
|
771
|
pigeonVar_channelName,
|
839
|
pigeonVar_channelName,
|
|
772
|
pigeonChannelCodec,
|
840
|
pigeonChannelCodec,
|
|
773
|
binaryMessenger: pigeonVar_binaryMessenger,
|
841
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
@@ -795,8 +863,10 @@ class HealthKitRawDataHostApi { |
|
@@ -795,8 +863,10 @@ class HealthKitRawDataHostApi { |
|
795
|
|
863
|
|
|
796
|
/// 让原生分享出来flutter的记录文件
|
864
|
/// 让原生分享出来flutter的记录文件
|
|
797
|
Future<bool> shareFlutterObserverRecord() async {
|
865
|
Future<bool> shareFlutterObserverRecord() async {
|
|
798
|
- final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.shareFlutterObserverRecord$pigeonVar_messageChannelSuffix';
|
|
|
|
799
|
- final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
866
|
+ final String pigeonVar_channelName =
|
|
|
|
867
|
+ 'dev.flutter.pigeon.doublefeel_flutter.HealthKitRawDataHostApi.shareFlutterObserverRecord$pigeonVar_messageChannelSuffix';
|
|
|
|
868
|
+ final BasicMessageChannel<Object?> pigeonVar_channel =
|
|
|
|
869
|
+ BasicMessageChannel<Object?>(
|
|
800
|
pigeonVar_channelName,
|
870
|
pigeonVar_channelName,
|
|
801
|
pigeonChannelCodec,
|
871
|
pigeonChannelCodec,
|
|
802
|
binaryMessenger: pigeonVar_binaryMessenger,
|
872
|
binaryMessenger: pigeonVar_binaryMessenger,
|