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