Commit 76128ab286eb3c694e32bd0b3ad28f31fa449b78
1 parent
5e3f9e29
feat(ui):flutter获取AppleHealth数据测试成功
Showing
16 changed files
with
1291 additions
and
708 deletions
| @@ -260,30 +260,31 @@ private open class HealthKitApiPigeonCodec : StandardMessageCodec() { | @@ -260,30 +260,31 @@ private open class HealthKitApiPigeonCodec : StandardMessageCodec() { | ||
| 260 | } | 260 | } |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | + | ||
| 263 | /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ | 264 | /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ |
| 264 | interface HealthKitHostApi { | 265 | interface HealthKitHostApi { |
| 265 | - fun checkHealthAppAuthorization(): Boolean | ||
| 266 | - fun getHealthServerAuthUrl(): String | 266 | + fun checkHealthAppAuthorization(callback: (Result<Boolean>) -> Unit) |
| 267 | + fun getHealthServerAuthUrl(callback: (Result<String>) -> Unit) | ||
| 267 | /** Opens Huawei Health client authorization UI. Returns whether user granted. */ | 268 | /** Opens Huawei Health client authorization UI. Returns whether user granted. */ |
| 268 | fun requestHealthClientAuthorization(): Boolean | 269 | fun requestHealthClientAuthorization(): Boolean |
| 269 | fun cancelHealthAppAuthorization(): Boolean | 270 | fun cancelHealthAppAuthorization(): Boolean |
| 270 | /** Runs native health read and server upload pipeline. */ | 271 | /** Runs native health read and server upload pipeline. */ |
| 271 | fun performHealthUpload(): HealthUploadResult | 272 | fun performHealthUpload(): HealthUploadResult |
| 272 | - fun fetchHrvData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 273 | - fun fetchHeartRateData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 274 | - fun fetchWalkingHeartRateData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 275 | - fun fetchRestingHeartRateData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 276 | - fun fetchSleepingHeartRateData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 277 | - fun fetchOxygenSaturationData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 278 | - fun fetchActiveEnergyData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 279 | - fun fetchExerciseData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 280 | - fun fetchStandData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 281 | - fun fetchStepCountData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 282 | - fun fetchSleepData(startTime: Long, endTime: Long): List<HealthSleepUploadDataPoint> | ||
| 283 | - fun fetchSleepingWristTemperatureData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 284 | - fun fetchRespiratoryRateData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 285 | - fun fetchIrregularHeartRhythmData(startTime: Long, endTime: Long): List<HealthUploadDataPoint> | ||
| 286 | - fun fetchActivityTargetData(startTime: Long, endTime: Long): HealthActivityTargetData? | 273 | + fun fetchHrvData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) |
| 274 | + fun fetchHeartRateData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 275 | + fun fetchWalkingHeartRateData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 276 | + fun fetchRestingHeartRateData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 277 | + fun fetchSleepingHeartRateData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 278 | + fun fetchOxygenSaturationData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 279 | + fun fetchActiveEnergyData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 280 | + fun fetchExerciseData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 281 | + fun fetchStandData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 282 | + fun fetchStepCountData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 283 | + fun fetchSleepData(startTime: Long, endTime: Long, callback: (Result<List<HealthSleepUploadDataPoint>>) -> Unit) | ||
| 284 | + fun fetchSleepingWristTemperatureData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 285 | + fun fetchRespiratoryRateData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 286 | + fun fetchIrregularHeartRhythmData(startTime: Long, endTime: Long, callback: (Result<List<HealthUploadDataPoint>>) -> Unit) | ||
| 287 | + fun fetchActivityTargetData(startTime: Long, endTime: Long, callback: (Result<HealthActivityTargetData?>) -> Unit) | ||
| 287 | 288 | ||
| 288 | companion object { | 289 | companion object { |
| 289 | /** The codec used by HealthKitHostApi. */ | 290 | /** The codec used by HealthKitHostApi. */ |
| @@ -298,12 +299,15 @@ interface HealthKitHostApi { | @@ -298,12 +299,15 @@ interface HealthKitHostApi { | ||
| 298 | val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization$separatedMessageChannelSuffix", codec) | 299 | val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization$separatedMessageChannelSuffix", codec) |
| 299 | if (api != null) { | 300 | if (api != null) { |
| 300 | channel.setMessageHandler { _, reply -> | 301 | channel.setMessageHandler { _, reply -> |
| 301 | - val wrapped: List<Any?> = try { | ||
| 302 | - listOf(api.checkHealthAppAuthorization()) | ||
| 303 | - } catch (exception: Throwable) { | ||
| 304 | - HealthKitApiPigeonUtils.wrapError(exception) | 302 | + api.checkHealthAppAuthorization{ result: Result<Boolean> -> |
| 303 | + val error = result.exceptionOrNull() | ||
| 304 | + if (error != null) { | ||
| 305 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 306 | + } else { | ||
| 307 | + val data = result.getOrNull() | ||
| 308 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 309 | + } | ||
| 305 | } | 310 | } |
| 306 | - reply.reply(wrapped) | ||
| 307 | } | 311 | } |
| 308 | } else { | 312 | } else { |
| 309 | channel.setMessageHandler(null) | 313 | channel.setMessageHandler(null) |
| @@ -313,12 +317,15 @@ interface HealthKitHostApi { | @@ -313,12 +317,15 @@ interface HealthKitHostApi { | ||
| 313 | val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl$separatedMessageChannelSuffix", codec) | 317 | val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl$separatedMessageChannelSuffix", codec) |
| 314 | if (api != null) { | 318 | if (api != null) { |
| 315 | channel.setMessageHandler { _, reply -> | 319 | channel.setMessageHandler { _, reply -> |
| 316 | - val wrapped: List<Any?> = try { | ||
| 317 | - listOf(api.getHealthServerAuthUrl()) | ||
| 318 | - } catch (exception: Throwable) { | ||
| 319 | - HealthKitApiPigeonUtils.wrapError(exception) | 320 | + api.getHealthServerAuthUrl{ result: Result<String> -> |
| 321 | + val error = result.exceptionOrNull() | ||
| 322 | + if (error != null) { | ||
| 323 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 324 | + } else { | ||
| 325 | + val data = result.getOrNull() | ||
| 326 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 327 | + } | ||
| 320 | } | 328 | } |
| 321 | - reply.reply(wrapped) | ||
| 322 | } | 329 | } |
| 323 | } else { | 330 | } else { |
| 324 | channel.setMessageHandler(null) | 331 | channel.setMessageHandler(null) |
| @@ -376,12 +383,15 @@ interface HealthKitHostApi { | @@ -376,12 +383,15 @@ interface HealthKitHostApi { | ||
| 376 | val args = message as List<Any?> | 383 | val args = message as List<Any?> |
| 377 | val startTimeArg = args[0] as Long | 384 | val startTimeArg = args[0] as Long |
| 378 | val endTimeArg = args[1] as Long | 385 | val endTimeArg = args[1] as Long |
| 379 | - val wrapped: List<Any?> = try { | ||
| 380 | - listOf(api.fetchHrvData(startTimeArg, endTimeArg)) | ||
| 381 | - } catch (exception: Throwable) { | ||
| 382 | - HealthKitApiPigeonUtils.wrapError(exception) | 386 | + api.fetchHrvData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 387 | + val error = result.exceptionOrNull() | ||
| 388 | + if (error != null) { | ||
| 389 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 390 | + } else { | ||
| 391 | + val data = result.getOrNull() | ||
| 392 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 393 | + } | ||
| 383 | } | 394 | } |
| 384 | - reply.reply(wrapped) | ||
| 385 | } | 395 | } |
| 386 | } else { | 396 | } else { |
| 387 | channel.setMessageHandler(null) | 397 | channel.setMessageHandler(null) |
| @@ -394,12 +404,15 @@ interface HealthKitHostApi { | @@ -394,12 +404,15 @@ interface HealthKitHostApi { | ||
| 394 | val args = message as List<Any?> | 404 | val args = message as List<Any?> |
| 395 | val startTimeArg = args[0] as Long | 405 | val startTimeArg = args[0] as Long |
| 396 | val endTimeArg = args[1] as Long | 406 | val endTimeArg = args[1] as Long |
| 397 | - val wrapped: List<Any?> = try { | ||
| 398 | - listOf(api.fetchHeartRateData(startTimeArg, endTimeArg)) | ||
| 399 | - } catch (exception: Throwable) { | ||
| 400 | - HealthKitApiPigeonUtils.wrapError(exception) | 407 | + api.fetchHeartRateData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 408 | + val error = result.exceptionOrNull() | ||
| 409 | + if (error != null) { | ||
| 410 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 411 | + } else { | ||
| 412 | + val data = result.getOrNull() | ||
| 413 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 414 | + } | ||
| 401 | } | 415 | } |
| 402 | - reply.reply(wrapped) | ||
| 403 | } | 416 | } |
| 404 | } else { | 417 | } else { |
| 405 | channel.setMessageHandler(null) | 418 | channel.setMessageHandler(null) |
| @@ -412,12 +425,15 @@ interface HealthKitHostApi { | @@ -412,12 +425,15 @@ interface HealthKitHostApi { | ||
| 412 | val args = message as List<Any?> | 425 | val args = message as List<Any?> |
| 413 | val startTimeArg = args[0] as Long | 426 | val startTimeArg = args[0] as Long |
| 414 | val endTimeArg = args[1] as Long | 427 | val endTimeArg = args[1] as Long |
| 415 | - val wrapped: List<Any?> = try { | ||
| 416 | - listOf(api.fetchWalkingHeartRateData(startTimeArg, endTimeArg)) | ||
| 417 | - } catch (exception: Throwable) { | ||
| 418 | - HealthKitApiPigeonUtils.wrapError(exception) | 428 | + api.fetchWalkingHeartRateData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 429 | + val error = result.exceptionOrNull() | ||
| 430 | + if (error != null) { | ||
| 431 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 432 | + } else { | ||
| 433 | + val data = result.getOrNull() | ||
| 434 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 435 | + } | ||
| 419 | } | 436 | } |
| 420 | - reply.reply(wrapped) | ||
| 421 | } | 437 | } |
| 422 | } else { | 438 | } else { |
| 423 | channel.setMessageHandler(null) | 439 | channel.setMessageHandler(null) |
| @@ -430,12 +446,15 @@ interface HealthKitHostApi { | @@ -430,12 +446,15 @@ interface HealthKitHostApi { | ||
| 430 | val args = message as List<Any?> | 446 | val args = message as List<Any?> |
| 431 | val startTimeArg = args[0] as Long | 447 | val startTimeArg = args[0] as Long |
| 432 | val endTimeArg = args[1] as Long | 448 | val endTimeArg = args[1] as Long |
| 433 | - val wrapped: List<Any?> = try { | ||
| 434 | - listOf(api.fetchRestingHeartRateData(startTimeArg, endTimeArg)) | ||
| 435 | - } catch (exception: Throwable) { | ||
| 436 | - HealthKitApiPigeonUtils.wrapError(exception) | 449 | + api.fetchRestingHeartRateData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 450 | + val error = result.exceptionOrNull() | ||
| 451 | + if (error != null) { | ||
| 452 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 453 | + } else { | ||
| 454 | + val data = result.getOrNull() | ||
| 455 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 456 | + } | ||
| 437 | } | 457 | } |
| 438 | - reply.reply(wrapped) | ||
| 439 | } | 458 | } |
| 440 | } else { | 459 | } else { |
| 441 | channel.setMessageHandler(null) | 460 | channel.setMessageHandler(null) |
| @@ -448,12 +467,15 @@ interface HealthKitHostApi { | @@ -448,12 +467,15 @@ interface HealthKitHostApi { | ||
| 448 | val args = message as List<Any?> | 467 | val args = message as List<Any?> |
| 449 | val startTimeArg = args[0] as Long | 468 | val startTimeArg = args[0] as Long |
| 450 | val endTimeArg = args[1] as Long | 469 | val endTimeArg = args[1] as Long |
| 451 | - val wrapped: List<Any?> = try { | ||
| 452 | - listOf(api.fetchSleepingHeartRateData(startTimeArg, endTimeArg)) | ||
| 453 | - } catch (exception: Throwable) { | ||
| 454 | - HealthKitApiPigeonUtils.wrapError(exception) | 470 | + api.fetchSleepingHeartRateData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 471 | + val error = result.exceptionOrNull() | ||
| 472 | + if (error != null) { | ||
| 473 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 474 | + } else { | ||
| 475 | + val data = result.getOrNull() | ||
| 476 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 477 | + } | ||
| 455 | } | 478 | } |
| 456 | - reply.reply(wrapped) | ||
| 457 | } | 479 | } |
| 458 | } else { | 480 | } else { |
| 459 | channel.setMessageHandler(null) | 481 | channel.setMessageHandler(null) |
| @@ -466,12 +488,15 @@ interface HealthKitHostApi { | @@ -466,12 +488,15 @@ interface HealthKitHostApi { | ||
| 466 | val args = message as List<Any?> | 488 | val args = message as List<Any?> |
| 467 | val startTimeArg = args[0] as Long | 489 | val startTimeArg = args[0] as Long |
| 468 | val endTimeArg = args[1] as Long | 490 | val endTimeArg = args[1] as Long |
| 469 | - val wrapped: List<Any?> = try { | ||
| 470 | - listOf(api.fetchOxygenSaturationData(startTimeArg, endTimeArg)) | ||
| 471 | - } catch (exception: Throwable) { | ||
| 472 | - HealthKitApiPigeonUtils.wrapError(exception) | 491 | + api.fetchOxygenSaturationData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 492 | + val error = result.exceptionOrNull() | ||
| 493 | + if (error != null) { | ||
| 494 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 495 | + } else { | ||
| 496 | + val data = result.getOrNull() | ||
| 497 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 498 | + } | ||
| 473 | } | 499 | } |
| 474 | - reply.reply(wrapped) | ||
| 475 | } | 500 | } |
| 476 | } else { | 501 | } else { |
| 477 | channel.setMessageHandler(null) | 502 | channel.setMessageHandler(null) |
| @@ -484,12 +509,15 @@ interface HealthKitHostApi { | @@ -484,12 +509,15 @@ interface HealthKitHostApi { | ||
| 484 | val args = message as List<Any?> | 509 | val args = message as List<Any?> |
| 485 | val startTimeArg = args[0] as Long | 510 | val startTimeArg = args[0] as Long |
| 486 | val endTimeArg = args[1] as Long | 511 | val endTimeArg = args[1] as Long |
| 487 | - val wrapped: List<Any?> = try { | ||
| 488 | - listOf(api.fetchActiveEnergyData(startTimeArg, endTimeArg)) | ||
| 489 | - } catch (exception: Throwable) { | ||
| 490 | - HealthKitApiPigeonUtils.wrapError(exception) | 512 | + api.fetchActiveEnergyData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 513 | + val error = result.exceptionOrNull() | ||
| 514 | + if (error != null) { | ||
| 515 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 516 | + } else { | ||
| 517 | + val data = result.getOrNull() | ||
| 518 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 519 | + } | ||
| 491 | } | 520 | } |
| 492 | - reply.reply(wrapped) | ||
| 493 | } | 521 | } |
| 494 | } else { | 522 | } else { |
| 495 | channel.setMessageHandler(null) | 523 | channel.setMessageHandler(null) |
| @@ -502,12 +530,15 @@ interface HealthKitHostApi { | @@ -502,12 +530,15 @@ interface HealthKitHostApi { | ||
| 502 | val args = message as List<Any?> | 530 | val args = message as List<Any?> |
| 503 | val startTimeArg = args[0] as Long | 531 | val startTimeArg = args[0] as Long |
| 504 | val endTimeArg = args[1] as Long | 532 | val endTimeArg = args[1] as Long |
| 505 | - val wrapped: List<Any?> = try { | ||
| 506 | - listOf(api.fetchExerciseData(startTimeArg, endTimeArg)) | ||
| 507 | - } catch (exception: Throwable) { | ||
| 508 | - HealthKitApiPigeonUtils.wrapError(exception) | 533 | + api.fetchExerciseData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 534 | + val error = result.exceptionOrNull() | ||
| 535 | + if (error != null) { | ||
| 536 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 537 | + } else { | ||
| 538 | + val data = result.getOrNull() | ||
| 539 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 540 | + } | ||
| 509 | } | 541 | } |
| 510 | - reply.reply(wrapped) | ||
| 511 | } | 542 | } |
| 512 | } else { | 543 | } else { |
| 513 | channel.setMessageHandler(null) | 544 | channel.setMessageHandler(null) |
| @@ -520,12 +551,15 @@ interface HealthKitHostApi { | @@ -520,12 +551,15 @@ interface HealthKitHostApi { | ||
| 520 | val args = message as List<Any?> | 551 | val args = message as List<Any?> |
| 521 | val startTimeArg = args[0] as Long | 552 | val startTimeArg = args[0] as Long |
| 522 | val endTimeArg = args[1] as Long | 553 | val endTimeArg = args[1] as Long |
| 523 | - val wrapped: List<Any?> = try { | ||
| 524 | - listOf(api.fetchStandData(startTimeArg, endTimeArg)) | ||
| 525 | - } catch (exception: Throwable) { | ||
| 526 | - HealthKitApiPigeonUtils.wrapError(exception) | 554 | + api.fetchStandData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 555 | + val error = result.exceptionOrNull() | ||
| 556 | + if (error != null) { | ||
| 557 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 558 | + } else { | ||
| 559 | + val data = result.getOrNull() | ||
| 560 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 561 | + } | ||
| 527 | } | 562 | } |
| 528 | - reply.reply(wrapped) | ||
| 529 | } | 563 | } |
| 530 | } else { | 564 | } else { |
| 531 | channel.setMessageHandler(null) | 565 | channel.setMessageHandler(null) |
| @@ -538,12 +572,15 @@ interface HealthKitHostApi { | @@ -538,12 +572,15 @@ interface HealthKitHostApi { | ||
| 538 | val args = message as List<Any?> | 572 | val args = message as List<Any?> |
| 539 | val startTimeArg = args[0] as Long | 573 | val startTimeArg = args[0] as Long |
| 540 | val endTimeArg = args[1] as Long | 574 | val endTimeArg = args[1] as Long |
| 541 | - val wrapped: List<Any?> = try { | ||
| 542 | - listOf(api.fetchStepCountData(startTimeArg, endTimeArg)) | ||
| 543 | - } catch (exception: Throwable) { | ||
| 544 | - HealthKitApiPigeonUtils.wrapError(exception) | 575 | + api.fetchStepCountData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 576 | + val error = result.exceptionOrNull() | ||
| 577 | + if (error != null) { | ||
| 578 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 579 | + } else { | ||
| 580 | + val data = result.getOrNull() | ||
| 581 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 582 | + } | ||
| 545 | } | 583 | } |
| 546 | - reply.reply(wrapped) | ||
| 547 | } | 584 | } |
| 548 | } else { | 585 | } else { |
| 549 | channel.setMessageHandler(null) | 586 | channel.setMessageHandler(null) |
| @@ -556,12 +593,15 @@ interface HealthKitHostApi { | @@ -556,12 +593,15 @@ interface HealthKitHostApi { | ||
| 556 | val args = message as List<Any?> | 593 | val args = message as List<Any?> |
| 557 | val startTimeArg = args[0] as Long | 594 | val startTimeArg = args[0] as Long |
| 558 | val endTimeArg = args[1] as Long | 595 | val endTimeArg = args[1] as Long |
| 559 | - val wrapped: List<Any?> = try { | ||
| 560 | - listOf(api.fetchSleepData(startTimeArg, endTimeArg)) | ||
| 561 | - } catch (exception: Throwable) { | ||
| 562 | - HealthKitApiPigeonUtils.wrapError(exception) | 596 | + api.fetchSleepData(startTimeArg, endTimeArg) { result: Result<List<HealthSleepUploadDataPoint>> -> |
| 597 | + val error = result.exceptionOrNull() | ||
| 598 | + if (error != null) { | ||
| 599 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 600 | + } else { | ||
| 601 | + val data = result.getOrNull() | ||
| 602 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 603 | + } | ||
| 563 | } | 604 | } |
| 564 | - reply.reply(wrapped) | ||
| 565 | } | 605 | } |
| 566 | } else { | 606 | } else { |
| 567 | channel.setMessageHandler(null) | 607 | channel.setMessageHandler(null) |
| @@ -574,12 +614,15 @@ interface HealthKitHostApi { | @@ -574,12 +614,15 @@ interface HealthKitHostApi { | ||
| 574 | val args = message as List<Any?> | 614 | val args = message as List<Any?> |
| 575 | val startTimeArg = args[0] as Long | 615 | val startTimeArg = args[0] as Long |
| 576 | val endTimeArg = args[1] as Long | 616 | val endTimeArg = args[1] as Long |
| 577 | - val wrapped: List<Any?> = try { | ||
| 578 | - listOf(api.fetchSleepingWristTemperatureData(startTimeArg, endTimeArg)) | ||
| 579 | - } catch (exception: Throwable) { | ||
| 580 | - HealthKitApiPigeonUtils.wrapError(exception) | 617 | + api.fetchSleepingWristTemperatureData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 618 | + val error = result.exceptionOrNull() | ||
| 619 | + if (error != null) { | ||
| 620 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 621 | + } else { | ||
| 622 | + val data = result.getOrNull() | ||
| 623 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 624 | + } | ||
| 581 | } | 625 | } |
| 582 | - reply.reply(wrapped) | ||
| 583 | } | 626 | } |
| 584 | } else { | 627 | } else { |
| 585 | channel.setMessageHandler(null) | 628 | channel.setMessageHandler(null) |
| @@ -592,12 +635,15 @@ interface HealthKitHostApi { | @@ -592,12 +635,15 @@ interface HealthKitHostApi { | ||
| 592 | val args = message as List<Any?> | 635 | val args = message as List<Any?> |
| 593 | val startTimeArg = args[0] as Long | 636 | val startTimeArg = args[0] as Long |
| 594 | val endTimeArg = args[1] as Long | 637 | val endTimeArg = args[1] as Long |
| 595 | - val wrapped: List<Any?> = try { | ||
| 596 | - listOf(api.fetchRespiratoryRateData(startTimeArg, endTimeArg)) | ||
| 597 | - } catch (exception: Throwable) { | ||
| 598 | - HealthKitApiPigeonUtils.wrapError(exception) | 638 | + api.fetchRespiratoryRateData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 639 | + val error = result.exceptionOrNull() | ||
| 640 | + if (error != null) { | ||
| 641 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 642 | + } else { | ||
| 643 | + val data = result.getOrNull() | ||
| 644 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 645 | + } | ||
| 599 | } | 646 | } |
| 600 | - reply.reply(wrapped) | ||
| 601 | } | 647 | } |
| 602 | } else { | 648 | } else { |
| 603 | channel.setMessageHandler(null) | 649 | channel.setMessageHandler(null) |
| @@ -610,12 +656,15 @@ interface HealthKitHostApi { | @@ -610,12 +656,15 @@ interface HealthKitHostApi { | ||
| 610 | val args = message as List<Any?> | 656 | val args = message as List<Any?> |
| 611 | val startTimeArg = args[0] as Long | 657 | val startTimeArg = args[0] as Long |
| 612 | val endTimeArg = args[1] as Long | 658 | val endTimeArg = args[1] as Long |
| 613 | - val wrapped: List<Any?> = try { | ||
| 614 | - listOf(api.fetchIrregularHeartRhythmData(startTimeArg, endTimeArg)) | ||
| 615 | - } catch (exception: Throwable) { | ||
| 616 | - HealthKitApiPigeonUtils.wrapError(exception) | 659 | + api.fetchIrregularHeartRhythmData(startTimeArg, endTimeArg) { result: Result<List<HealthUploadDataPoint>> -> |
| 660 | + val error = result.exceptionOrNull() | ||
| 661 | + if (error != null) { | ||
| 662 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 663 | + } else { | ||
| 664 | + val data = result.getOrNull() | ||
| 665 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 666 | + } | ||
| 617 | } | 667 | } |
| 618 | - reply.reply(wrapped) | ||
| 619 | } | 668 | } |
| 620 | } else { | 669 | } else { |
| 621 | channel.setMessageHandler(null) | 670 | channel.setMessageHandler(null) |
| @@ -628,12 +677,15 @@ interface HealthKitHostApi { | @@ -628,12 +677,15 @@ interface HealthKitHostApi { | ||
| 628 | val args = message as List<Any?> | 677 | val args = message as List<Any?> |
| 629 | val startTimeArg = args[0] as Long | 678 | val startTimeArg = args[0] as Long |
| 630 | val endTimeArg = args[1] as Long | 679 | val endTimeArg = args[1] as Long |
| 631 | - val wrapped: List<Any?> = try { | ||
| 632 | - listOf(api.fetchActivityTargetData(startTimeArg, endTimeArg)) | ||
| 633 | - } catch (exception: Throwable) { | ||
| 634 | - HealthKitApiPigeonUtils.wrapError(exception) | 680 | + api.fetchActivityTargetData(startTimeArg, endTimeArg) { result: Result<HealthActivityTargetData?> -> |
| 681 | + val error = result.exceptionOrNull() | ||
| 682 | + if (error != null) { | ||
| 683 | + reply.reply(HealthKitApiPigeonUtils.wrapError(error)) | ||
| 684 | + } else { | ||
| 685 | + val data = result.getOrNull() | ||
| 686 | + reply.reply(HealthKitApiPigeonUtils.wrapResult(data)) | ||
| 687 | + } | ||
| 635 | } | 688 | } |
| 636 | - reply.reply(wrapped) | ||
| 637 | } | 689 | } |
| 638 | } else { | 690 | } else { |
| 639 | channel.setMessageHandler(null) | 691 | channel.setMessageHandler(null) |
| @@ -92,7 +92,7 @@ EXTERNAL SOURCES: | @@ -92,7 +92,7 @@ EXTERNAL SOURCES: | ||
| 92 | :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" | 92 | :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" |
| 93 | 93 | ||
| 94 | SPEC CHECKSUMS: | 94 | SPEC CHECKSUMS: |
| 95 | - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 | 95 | + Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 |
| 96 | fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 | 96 | fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 |
| 97 | image_cropper: c4326ea50132b1e1564499e5d32a84f01fb03537 | 97 | image_cropper: c4326ea50132b1e1564499e5d32a84f01fb03537 |
| 98 | image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a | 98 | image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a |
| @@ -53,6 +53,13 @@ | @@ -53,6 +53,13 @@ | ||
| 53 | ReferencedContainer = "container:Runner.xcodeproj"> | 53 | ReferencedContainer = "container:Runner.xcodeproj"> |
| 54 | </BuildableReference> | 54 | </BuildableReference> |
| 55 | </BuildableProductRunnable> | 55 | </BuildableProductRunnable> |
| 56 | + <EnvironmentVariables> | ||
| 57 | + <EnvironmentVariable | ||
| 58 | + key = "DEBUG_LOCAL" | ||
| 59 | + value = "1" | ||
| 60 | + isEnabled = "YES"> | ||
| 61 | + </EnvironmentVariable> | ||
| 62 | + </EnvironmentVariables> | ||
| 56 | </LaunchAction> | 63 | </LaunchAction> |
| 57 | <ProfileAction | 64 | <ProfileAction |
| 58 | buildConfiguration = "Profile" | 65 | buildConfiguration = "Profile" |
ios/Runner/AppleHealthTestView.swift
0 → 100644
| 1 | +// | ||
| 2 | +// AppleHealthTestView.swift | ||
| 3 | +// Runner | ||
| 4 | +// | ||
| 5 | +// Created by 权海 on 2026/6/15. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import SwiftUI | ||
| 9 | + | ||
| 10 | +struct AppleHealthTestView: View { | ||
| 11 | + @State private var logs: [String] = [] | ||
| 12 | + @State private var isRunning = false | ||
| 13 | + @State private var runningTitle: String? | ||
| 14 | + | ||
| 15 | + private let api = HealthKitHostApiImpl() | ||
| 16 | + private let logTimeFormatter: DateFormatter = { | ||
| 17 | + let formatter = DateFormatter() | ||
| 18 | + formatter.dateFormat = "HH:mm:ss.SSS" | ||
| 19 | + return formatter | ||
| 20 | + }() | ||
| 21 | + | ||
| 22 | + var body: some View { | ||
| 23 | + NavigationStack { | ||
| 24 | + VStack(spacing: 0) { | ||
| 25 | + logPanel | ||
| 26 | + | ||
| 27 | + Divider() | ||
| 28 | + | ||
| 29 | + HStack(spacing: 12) { | ||
| 30 | + actionButton(title: "AppleHealth 权限检查", systemImage: "checkmark.shield") { | ||
| 31 | + await runPermissionCheck() | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + actionButton(title: "获取数据接口", systemImage: "waveform.path.ecg") { | ||
| 35 | + await runDataFetch() | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + .padding(16) | ||
| 39 | + .background(.regularMaterial) | ||
| 40 | + } | ||
| 41 | + .navigationTitle("Apple Health Test") | ||
| 42 | + .navigationBarTitleDisplayMode(.inline) | ||
| 43 | + .toolbar { | ||
| 44 | + ToolbarItem(placement: .topBarTrailing) { | ||
| 45 | + Button("清空") { | ||
| 46 | + logs.removeAll() | ||
| 47 | + } | ||
| 48 | + .disabled(isRunning || logs.isEmpty) | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + private var logPanel: some View { | ||
| 55 | + ScrollViewReader { proxy in | ||
| 56 | + ScrollView { | ||
| 57 | + LazyVStack(alignment: .leading, spacing: 8) { | ||
| 58 | + if logs.isEmpty { | ||
| 59 | + ContentUnavailableView( | ||
| 60 | + "暂无日志", | ||
| 61 | + systemImage: "list.bullet.rectangle", | ||
| 62 | + description: Text("点击底部按钮开始测试 HealthKitHostApiImpl。") | ||
| 63 | + ) | ||
| 64 | + .frame(maxWidth: .infinity, minHeight: 280) | ||
| 65 | + } else { | ||
| 66 | + ForEach(Array(logs.enumerated()), id: \.offset) { index, line in | ||
| 67 | + Text(line) | ||
| 68 | + .font(.system(.footnote, design: .monospaced)) | ||
| 69 | + .foregroundStyle(line.contains("❌") ? .red : .primary) | ||
| 70 | + .textSelection(.enabled) | ||
| 71 | + .frame(maxWidth: .infinity, alignment: .leading) | ||
| 72 | + .id(index) | ||
| 73 | + } | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + .padding(16) | ||
| 77 | + } | ||
| 78 | + .background(Color(.systemGroupedBackground)) | ||
| 79 | + .onChange(of: logs.count) { _, newValue in | ||
| 80 | + guard newValue > 0 else { return } | ||
| 81 | + withAnimation(.easeOut(duration: 0.2)) { | ||
| 82 | + proxy.scrollTo(newValue - 1, anchor: .bottom) | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + private func actionButton( | ||
| 89 | + title: String, | ||
| 90 | + systemImage: String, | ||
| 91 | + action: @escaping () async -> Void | ||
| 92 | + ) -> some View { | ||
| 93 | + Button { | ||
| 94 | + guard !isRunning else { return } | ||
| 95 | + Task { | ||
| 96 | + await runAction(title, action: action) | ||
| 97 | + } | ||
| 98 | + } label: { | ||
| 99 | + Label(isRunning && runningTitle == title ? "执行中..." : title, systemImage: systemImage) | ||
| 100 | + .font(.system(size: 15, weight: .semibold)) | ||
| 101 | + .frame(maxWidth: .infinity) | ||
| 102 | + .frame(height: 48) | ||
| 103 | + } | ||
| 104 | + .buttonStyle(.borderedProminent) | ||
| 105 | + .disabled(isRunning) | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + @MainActor | ||
| 109 | + private func runAction(_ title: String, action: @escaping () async -> Void) async { | ||
| 110 | + isRunning = true | ||
| 111 | + runningTitle = title | ||
| 112 | + appendLog("▶️ \(title) 开始") | ||
| 113 | + await action() | ||
| 114 | + appendLog("✅ \(title) 完成") | ||
| 115 | + isRunning = false | ||
| 116 | + runningTitle = nil | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + private func runPermissionCheck() async { | ||
| 120 | + do { | ||
| 121 | + let isAuthorized = try await checkHealthAuthorization() | ||
| 122 | + await appendLog("checkHealthAppAuthorization = \(isAuthorized)") | ||
| 123 | + | ||
| 124 | + let authUrl = try await getHealthServerAuthUrl() | ||
| 125 | + await appendLog("getHealthServerAuthUrl = \(authUrl.isEmpty ? "<empty, iOS system managed>" : authUrl)") | ||
| 126 | + | ||
| 127 | + if !isAuthorized { | ||
| 128 | + await appendLog("当前未授权,开始 requestHealthClientAuthorization") | ||
| 129 | + let granted = try api.requestHealthClientAuthorization() | ||
| 130 | + await appendLog("requestHealthClientAuthorization = \(granted)") | ||
| 131 | + } else { | ||
| 132 | + await appendLog("当前已授权,跳过 requestHealthClientAuthorization") | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + let cancelResult = try api.cancelHealthAppAuthorization() | ||
| 136 | + await appendLog("cancelHealthAppAuthorization = \(cancelResult) (iOS 不支持应用内撤销)") | ||
| 137 | + } catch { | ||
| 138 | + await appendError("权限检查失败", error) | ||
| 139 | + } | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + private func runDataFetch() async { | ||
| 143 | + let endTime = Int64(Date().timeIntervalSince1970) | ||
| 144 | + let startTime = Int64(Calendar.current.date(byAdding: .day, value: -7, to: Date())?.timeIntervalSince1970 ?? Date().timeIntervalSince1970) | ||
| 145 | + await appendLog("数据范围: \(formatTimestamp(startTime)) -> \(formatTimestamp(endTime))") | ||
| 146 | + | ||
| 147 | + do { | ||
| 148 | + let uploadResult = try api.performHealthUpload() | ||
| 149 | + await appendLog( | ||
| 150 | + "performHealthUpload common=\(uploadResult.commonUploadSuccess), sleep=\(uploadResult.sleepUploadSuccess), error=\(uploadResult.errorMessage ?? "nil")" | ||
| 151 | + ) | ||
| 152 | + } catch { | ||
| 153 | + await appendError("performHealthUpload 失败", error) | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + await fetchCommon("HRV", startTime, endTime, api.fetchHrvData) | ||
| 157 | + await fetchCommon("心率", startTime, endTime, api.fetchHeartRateData) | ||
| 158 | + await fetchCommon("步行心率", startTime, endTime, api.fetchWalkingHeartRateData) | ||
| 159 | + await fetchCommon("静息心率", startTime, endTime, api.fetchRestingHeartRateData) | ||
| 160 | + await fetchCommon("睡眠心率", startTime, endTime, api.fetchSleepingHeartRateData) | ||
| 161 | + await fetchCommon("血氧", startTime, endTime, api.fetchOxygenSaturationData) | ||
| 162 | + await fetchCommon("活动能量", startTime, endTime, api.fetchActiveEnergyData) | ||
| 163 | + await fetchCommon("锻炼", startTime, endTime, api.fetchExerciseData) | ||
| 164 | + await fetchCommon("站立", startTime, endTime, api.fetchStandData) | ||
| 165 | + await fetchCommon("步数", startTime, endTime, api.fetchStepCountData) | ||
| 166 | + await fetchCommon("睡眠腕温", startTime, endTime, api.fetchSleepingWristTemperatureData) | ||
| 167 | + await fetchCommon("呼吸频率", startTime, endTime, api.fetchRespiratoryRateData) | ||
| 168 | + await fetchCommon("不规则心律", startTime, endTime, api.fetchIrregularHeartRhythmData) | ||
| 169 | + await fetchSleep(startTime: startTime, endTime: endTime) | ||
| 170 | + await fetchActivityTarget(startTime: startTime, endTime: endTime) | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + private func fetchCommon( | ||
| 174 | + _ title: String, | ||
| 175 | + _ startTime: Int64, | ||
| 176 | + _ endTime: Int64, | ||
| 177 | + _ fetch: @escaping (Int64, Int64, @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) -> Void | ||
| 178 | + ) async { | ||
| 179 | + do { | ||
| 180 | + let points = try await withCheckedThrowingContinuation { continuation in | ||
| 181 | + fetch(startTime, endTime) { result in | ||
| 182 | + continuation.resume(with: result) | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + await appendLog("\(title): \(points.count) 条") | ||
| 186 | + await appendSample(points) | ||
| 187 | + } catch { | ||
| 188 | + await appendError("\(title) 获取失败", error) | ||
| 189 | + } | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + private func fetchSleep(startTime: Int64, endTime: Int64) async { | ||
| 193 | + do { | ||
| 194 | + let points = try await withCheckedThrowingContinuation { continuation in | ||
| 195 | + api.fetchSleepData(startTime: startTime, endTime: endTime) { result in | ||
| 196 | + continuation.resume(with: result) | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + await appendLog("睡眠: \(points.count) 条") | ||
| 200 | + for point in points.prefix(3) { | ||
| 201 | + await appendLog(" sample dataType=\(point.dataType), from=\(formatTimestamp(point.fromTime)), to=\(formatTimestamp(point.toTime))") | ||
| 202 | + } | ||
| 203 | + } catch { | ||
| 204 | + await appendError("睡眠获取失败", error) | ||
| 205 | + } | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + private func fetchActivityTarget(startTime: Int64, endTime: Int64) async { | ||
| 209 | + do { | ||
| 210 | + let target = try await withCheckedThrowingContinuation { continuation in | ||
| 211 | + api.fetchActivityTargetData(startTime: startTime, endTime: endTime) { result in | ||
| 212 | + continuation.resume(with: result) | ||
| 213 | + } | ||
| 214 | + } | ||
| 215 | + if let target { | ||
| 216 | + await appendLog("活动目标: move=\(target.move.map(String.init) ?? "nil"), stand=\(target.stand.map(String.init) ?? "nil")") | ||
| 217 | + } else { | ||
| 218 | + await appendLog("活动目标: nil") | ||
| 219 | + } | ||
| 220 | + } catch { | ||
| 221 | + await appendError("活动目标获取失败", error) | ||
| 222 | + } | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + private func checkHealthAuthorization() async throws -> Bool { | ||
| 226 | + try await withCheckedThrowingContinuation { continuation in | ||
| 227 | + api.checkHealthAppAuthorization { result in | ||
| 228 | + continuation.resume(with: result) | ||
| 229 | + } | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + private func getHealthServerAuthUrl() async throws -> String { | ||
| 234 | + try await withCheckedThrowingContinuation { continuation in | ||
| 235 | + api.getHealthServerAuthUrl { result in | ||
| 236 | + continuation.resume(with: result) | ||
| 237 | + } | ||
| 238 | + } | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + @MainActor | ||
| 242 | + private func appendLog(_ message: String) { | ||
| 243 | + logs.append("[\(logTimeFormatter.string(from: Date()))] \(message)") | ||
| 244 | + } | ||
| 245 | + | ||
| 246 | + @MainActor | ||
| 247 | + private func appendError(_ prefix: String, _ error: Error) { | ||
| 248 | + appendLog("❌ \(prefix): \(error.localizedDescription)") | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + @MainActor | ||
| 252 | + private func appendSample(_ points: [HealthUploadDataPoint]) { | ||
| 253 | + for point in points.prefix(3) { | ||
| 254 | + appendLog(" sample dataType=\(point.dataType), time=\(formatTimestamp(point.time)), value=\(point.value)") | ||
| 255 | + } | ||
| 256 | + } | ||
| 257 | + | ||
| 258 | + private func formatTimestamp(_ timestamp: Int64) -> String { | ||
| 259 | + let date = Date(timeIntervalSince1970: TimeInterval(timestamp)) | ||
| 260 | + let formatter = DateFormatter() | ||
| 261 | + formatter.dateFormat = "yyyy-MM-dd HH:mm:ss" | ||
| 262 | + return formatter.string(from: date) | ||
| 263 | + } | ||
| 264 | +} | ||
| 265 | + | ||
| 266 | +#Preview { | ||
| 267 | + AppleHealthTestView() | ||
| 268 | +} |
| @@ -272,8 +272,12 @@ final class HealthDataReader { | @@ -272,8 +272,12 @@ final class HealthDataReader { | ||
| 272 | 272 | ||
| 273 | func fetchActivityTargetData(startDate: Date, endDate: Date) async throws -> NativeActivityTarget? { | 273 | func fetchActivityTargetData(startDate: Date, endDate: Date) async throws -> NativeActivityTarget? { |
| 274 | let calendar = Calendar.current | 274 | let calendar = Calendar.current |
| 275 | - let start = calendar.dateComponents([.era, .year, .month, .day], from: startDate) | ||
| 276 | - let end = calendar.dateComponents([.era, .year, .month, .day], from: endDate) | 275 | + var start = calendar.dateComponents([.era, .year, .month, .day], from: startDate) |
| 276 | + var end = calendar.dateComponents([.era, .year, .month, .day], from: endDate) | ||
| 277 | + | ||
| 278 | + start.calendar = calendar | ||
| 279 | + end.calendar = calendar | ||
| 280 | + | ||
| 277 | let predicate = HKQuery.predicate(forActivitySummariesBetweenStart: start, end: end) | 281 | let predicate = HKQuery.predicate(forActivitySummariesBetweenStart: start, end: end) |
| 278 | 282 | ||
| 279 | return try await withCheckedThrowingContinuation { continuation in | 283 | return try await withCheckedThrowingContinuation { continuation in |
| @@ -291,30 +291,31 @@ class HealthKitApiPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable | @@ -291,30 +291,31 @@ class HealthKitApiPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable | ||
| 291 | static let shared = HealthKitApiPigeonCodec(readerWriter: HealthKitApiPigeonCodecReaderWriter()) | 291 | static let shared = HealthKitApiPigeonCodec(readerWriter: HealthKitApiPigeonCodecReaderWriter()) |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | + | ||
| 294 | /// Generated protocol from Pigeon that represents a handler of messages from Flutter. | 295 | /// Generated protocol from Pigeon that represents a handler of messages from Flutter. |
| 295 | protocol HealthKitHostApi { | 296 | protocol HealthKitHostApi { |
| 296 | - func checkHealthAppAuthorization() throws -> Bool | ||
| 297 | - func getHealthServerAuthUrl() throws -> String | 297 | + func checkHealthAppAuthorization(completion: @escaping (Result<Bool, Error>) -> Void) |
| 298 | + func getHealthServerAuthUrl(completion: @escaping (Result<String, Error>) -> Void) | ||
| 298 | /// Opens Huawei Health client authorization UI. Returns whether user granted. | 299 | /// Opens Huawei Health client authorization UI. Returns whether user granted. |
| 299 | func requestHealthClientAuthorization() throws -> Bool | 300 | func requestHealthClientAuthorization() throws -> Bool |
| 300 | func cancelHealthAppAuthorization() throws -> Bool | 301 | func cancelHealthAppAuthorization() throws -> Bool |
| 301 | /// Runs native health read and server upload pipeline. | 302 | /// Runs native health read and server upload pipeline. |
| 302 | func performHealthUpload() throws -> HealthUploadResult | 303 | func performHealthUpload() throws -> HealthUploadResult |
| 303 | - func fetchHrvData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 304 | - func fetchHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 305 | - func fetchWalkingHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 306 | - func fetchRestingHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 307 | - func fetchSleepingHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 308 | - func fetchOxygenSaturationData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 309 | - func fetchActiveEnergyData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 310 | - func fetchExerciseData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 311 | - func fetchStandData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 312 | - func fetchStepCountData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 313 | - func fetchSleepData(startTime: Int64, endTime: Int64) throws -> [HealthSleepUploadDataPoint] | ||
| 314 | - func fetchSleepingWristTemperatureData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 315 | - func fetchRespiratoryRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 316 | - func fetchIrregularHeartRhythmData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] | ||
| 317 | - func fetchActivityTargetData(startTime: Int64, endTime: Int64) throws -> HealthActivityTargetData? | 304 | + func fetchHrvData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) |
| 305 | + func fetchHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 306 | + func fetchWalkingHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 307 | + func fetchRestingHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 308 | + func fetchSleepingHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 309 | + func fetchOxygenSaturationData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 310 | + func fetchActiveEnergyData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 311 | + func fetchExerciseData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 312 | + func fetchStandData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 313 | + func fetchStepCountData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 314 | + func fetchSleepData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthSleepUploadDataPoint], Error>) -> Void) | ||
| 315 | + func fetchSleepingWristTemperatureData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 316 | + func fetchRespiratoryRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 317 | + func fetchIrregularHeartRhythmData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) | ||
| 318 | + func fetchActivityTargetData(startTime: Int64, endTime: Int64, completion: @escaping (Result<HealthActivityTargetData?, Error>) -> Void) | ||
| 318 | } | 319 | } |
| 319 | 320 | ||
| 320 | /// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. | 321 | /// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. |
| @@ -326,11 +327,13 @@ class HealthKitHostApiSetup { | @@ -326,11 +327,13 @@ class HealthKitHostApiSetup { | ||
| 326 | let checkHealthAppAuthorizationChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) | 327 | let checkHealthAppAuthorizationChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) |
| 327 | if let api = api { | 328 | if let api = api { |
| 328 | checkHealthAppAuthorizationChannel.setMessageHandler { _, reply in | 329 | checkHealthAppAuthorizationChannel.setMessageHandler { _, reply in |
| 329 | - do { | ||
| 330 | - let result = try api.checkHealthAppAuthorization() | ||
| 331 | - reply(wrapResult(result)) | ||
| 332 | - } catch { | ||
| 333 | - reply(wrapError(error)) | 330 | + api.checkHealthAppAuthorization { result in |
| 331 | + switch result { | ||
| 332 | + case .success(let res): | ||
| 333 | + reply(wrapResult(res)) | ||
| 334 | + case .failure(let error): | ||
| 335 | + reply(wrapError(error)) | ||
| 336 | + } | ||
| 334 | } | 337 | } |
| 335 | } | 338 | } |
| 336 | } else { | 339 | } else { |
| @@ -339,11 +342,13 @@ class HealthKitHostApiSetup { | @@ -339,11 +342,13 @@ class HealthKitHostApiSetup { | ||
| 339 | let getHealthServerAuthUrlChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) | 342 | let getHealthServerAuthUrlChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) |
| 340 | if let api = api { | 343 | if let api = api { |
| 341 | getHealthServerAuthUrlChannel.setMessageHandler { _, reply in | 344 | getHealthServerAuthUrlChannel.setMessageHandler { _, reply in |
| 342 | - do { | ||
| 343 | - let result = try api.getHealthServerAuthUrl() | ||
| 344 | - reply(wrapResult(result)) | ||
| 345 | - } catch { | ||
| 346 | - reply(wrapError(error)) | 345 | + api.getHealthServerAuthUrl { result in |
| 346 | + switch result { | ||
| 347 | + case .success(let res): | ||
| 348 | + reply(wrapResult(res)) | ||
| 349 | + case .failure(let error): | ||
| 350 | + reply(wrapError(error)) | ||
| 351 | + } | ||
| 347 | } | 352 | } |
| 348 | } | 353 | } |
| 349 | } else { | 354 | } else { |
| @@ -396,11 +401,13 @@ class HealthKitHostApiSetup { | @@ -396,11 +401,13 @@ class HealthKitHostApiSetup { | ||
| 396 | let args = message as! [Any?] | 401 | let args = message as! [Any?] |
| 397 | let startTimeArg = args[0] as! Int64 | 402 | let startTimeArg = args[0] as! Int64 |
| 398 | let endTimeArg = args[1] as! Int64 | 403 | let endTimeArg = args[1] as! Int64 |
| 399 | - do { | ||
| 400 | - let result = try api.fetchHrvData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 401 | - reply(wrapResult(result)) | ||
| 402 | - } catch { | ||
| 403 | - reply(wrapError(error)) | 404 | + api.fetchHrvData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 405 | + switch result { | ||
| 406 | + case .success(let res): | ||
| 407 | + reply(wrapResult(res)) | ||
| 408 | + case .failure(let error): | ||
| 409 | + reply(wrapError(error)) | ||
| 410 | + } | ||
| 404 | } | 411 | } |
| 405 | } | 412 | } |
| 406 | } else { | 413 | } else { |
| @@ -412,11 +419,13 @@ class HealthKitHostApiSetup { | @@ -412,11 +419,13 @@ class HealthKitHostApiSetup { | ||
| 412 | let args = message as! [Any?] | 419 | let args = message as! [Any?] |
| 413 | let startTimeArg = args[0] as! Int64 | 420 | let startTimeArg = args[0] as! Int64 |
| 414 | let endTimeArg = args[1] as! Int64 | 421 | let endTimeArg = args[1] as! Int64 |
| 415 | - do { | ||
| 416 | - let result = try api.fetchHeartRateData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 417 | - reply(wrapResult(result)) | ||
| 418 | - } catch { | ||
| 419 | - reply(wrapError(error)) | 422 | + api.fetchHeartRateData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 423 | + switch result { | ||
| 424 | + case .success(let res): | ||
| 425 | + reply(wrapResult(res)) | ||
| 426 | + case .failure(let error): | ||
| 427 | + reply(wrapError(error)) | ||
| 428 | + } | ||
| 420 | } | 429 | } |
| 421 | } | 430 | } |
| 422 | } else { | 431 | } else { |
| @@ -428,11 +437,13 @@ class HealthKitHostApiSetup { | @@ -428,11 +437,13 @@ class HealthKitHostApiSetup { | ||
| 428 | let args = message as! [Any?] | 437 | let args = message as! [Any?] |
| 429 | let startTimeArg = args[0] as! Int64 | 438 | let startTimeArg = args[0] as! Int64 |
| 430 | let endTimeArg = args[1] as! Int64 | 439 | let endTimeArg = args[1] as! Int64 |
| 431 | - do { | ||
| 432 | - let result = try api.fetchWalkingHeartRateData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 433 | - reply(wrapResult(result)) | ||
| 434 | - } catch { | ||
| 435 | - reply(wrapError(error)) | 440 | + api.fetchWalkingHeartRateData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 441 | + switch result { | ||
| 442 | + case .success(let res): | ||
| 443 | + reply(wrapResult(res)) | ||
| 444 | + case .failure(let error): | ||
| 445 | + reply(wrapError(error)) | ||
| 446 | + } | ||
| 436 | } | 447 | } |
| 437 | } | 448 | } |
| 438 | } else { | 449 | } else { |
| @@ -444,11 +455,13 @@ class HealthKitHostApiSetup { | @@ -444,11 +455,13 @@ class HealthKitHostApiSetup { | ||
| 444 | let args = message as! [Any?] | 455 | let args = message as! [Any?] |
| 445 | let startTimeArg = args[0] as! Int64 | 456 | let startTimeArg = args[0] as! Int64 |
| 446 | let endTimeArg = args[1] as! Int64 | 457 | let endTimeArg = args[1] as! Int64 |
| 447 | - do { | ||
| 448 | - let result = try api.fetchRestingHeartRateData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 449 | - reply(wrapResult(result)) | ||
| 450 | - } catch { | ||
| 451 | - reply(wrapError(error)) | 458 | + api.fetchRestingHeartRateData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 459 | + switch result { | ||
| 460 | + case .success(let res): | ||
| 461 | + reply(wrapResult(res)) | ||
| 462 | + case .failure(let error): | ||
| 463 | + reply(wrapError(error)) | ||
| 464 | + } | ||
| 452 | } | 465 | } |
| 453 | } | 466 | } |
| 454 | } else { | 467 | } else { |
| @@ -460,11 +473,13 @@ class HealthKitHostApiSetup { | @@ -460,11 +473,13 @@ class HealthKitHostApiSetup { | ||
| 460 | let args = message as! [Any?] | 473 | let args = message as! [Any?] |
| 461 | let startTimeArg = args[0] as! Int64 | 474 | let startTimeArg = args[0] as! Int64 |
| 462 | let endTimeArg = args[1] as! Int64 | 475 | let endTimeArg = args[1] as! Int64 |
| 463 | - do { | ||
| 464 | - let result = try api.fetchSleepingHeartRateData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 465 | - reply(wrapResult(result)) | ||
| 466 | - } catch { | ||
| 467 | - reply(wrapError(error)) | 476 | + api.fetchSleepingHeartRateData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 477 | + switch result { | ||
| 478 | + case .success(let res): | ||
| 479 | + reply(wrapResult(res)) | ||
| 480 | + case .failure(let error): | ||
| 481 | + reply(wrapError(error)) | ||
| 482 | + } | ||
| 468 | } | 483 | } |
| 469 | } | 484 | } |
| 470 | } else { | 485 | } else { |
| @@ -476,11 +491,13 @@ class HealthKitHostApiSetup { | @@ -476,11 +491,13 @@ class HealthKitHostApiSetup { | ||
| 476 | let args = message as! [Any?] | 491 | let args = message as! [Any?] |
| 477 | let startTimeArg = args[0] as! Int64 | 492 | let startTimeArg = args[0] as! Int64 |
| 478 | let endTimeArg = args[1] as! Int64 | 493 | let endTimeArg = args[1] as! Int64 |
| 479 | - do { | ||
| 480 | - let result = try api.fetchOxygenSaturationData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 481 | - reply(wrapResult(result)) | ||
| 482 | - } catch { | ||
| 483 | - reply(wrapError(error)) | 494 | + api.fetchOxygenSaturationData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 495 | + switch result { | ||
| 496 | + case .success(let res): | ||
| 497 | + reply(wrapResult(res)) | ||
| 498 | + case .failure(let error): | ||
| 499 | + reply(wrapError(error)) | ||
| 500 | + } | ||
| 484 | } | 501 | } |
| 485 | } | 502 | } |
| 486 | } else { | 503 | } else { |
| @@ -492,11 +509,13 @@ class HealthKitHostApiSetup { | @@ -492,11 +509,13 @@ class HealthKitHostApiSetup { | ||
| 492 | let args = message as! [Any?] | 509 | let args = message as! [Any?] |
| 493 | let startTimeArg = args[0] as! Int64 | 510 | let startTimeArg = args[0] as! Int64 |
| 494 | let endTimeArg = args[1] as! Int64 | 511 | let endTimeArg = args[1] as! Int64 |
| 495 | - do { | ||
| 496 | - let result = try api.fetchActiveEnergyData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 497 | - reply(wrapResult(result)) | ||
| 498 | - } catch { | ||
| 499 | - reply(wrapError(error)) | 512 | + api.fetchActiveEnergyData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 513 | + switch result { | ||
| 514 | + case .success(let res): | ||
| 515 | + reply(wrapResult(res)) | ||
| 516 | + case .failure(let error): | ||
| 517 | + reply(wrapError(error)) | ||
| 518 | + } | ||
| 500 | } | 519 | } |
| 501 | } | 520 | } |
| 502 | } else { | 521 | } else { |
| @@ -508,11 +527,13 @@ class HealthKitHostApiSetup { | @@ -508,11 +527,13 @@ class HealthKitHostApiSetup { | ||
| 508 | let args = message as! [Any?] | 527 | let args = message as! [Any?] |
| 509 | let startTimeArg = args[0] as! Int64 | 528 | let startTimeArg = args[0] as! Int64 |
| 510 | let endTimeArg = args[1] as! Int64 | 529 | let endTimeArg = args[1] as! Int64 |
| 511 | - do { | ||
| 512 | - let result = try api.fetchExerciseData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 513 | - reply(wrapResult(result)) | ||
| 514 | - } catch { | ||
| 515 | - reply(wrapError(error)) | 530 | + api.fetchExerciseData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 531 | + switch result { | ||
| 532 | + case .success(let res): | ||
| 533 | + reply(wrapResult(res)) | ||
| 534 | + case .failure(let error): | ||
| 535 | + reply(wrapError(error)) | ||
| 536 | + } | ||
| 516 | } | 537 | } |
| 517 | } | 538 | } |
| 518 | } else { | 539 | } else { |
| @@ -524,11 +545,13 @@ class HealthKitHostApiSetup { | @@ -524,11 +545,13 @@ class HealthKitHostApiSetup { | ||
| 524 | let args = message as! [Any?] | 545 | let args = message as! [Any?] |
| 525 | let startTimeArg = args[0] as! Int64 | 546 | let startTimeArg = args[0] as! Int64 |
| 526 | let endTimeArg = args[1] as! Int64 | 547 | let endTimeArg = args[1] as! Int64 |
| 527 | - do { | ||
| 528 | - let result = try api.fetchStandData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 529 | - reply(wrapResult(result)) | ||
| 530 | - } catch { | ||
| 531 | - reply(wrapError(error)) | 548 | + api.fetchStandData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 549 | + switch result { | ||
| 550 | + case .success(let res): | ||
| 551 | + reply(wrapResult(res)) | ||
| 552 | + case .failure(let error): | ||
| 553 | + reply(wrapError(error)) | ||
| 554 | + } | ||
| 532 | } | 555 | } |
| 533 | } | 556 | } |
| 534 | } else { | 557 | } else { |
| @@ -540,11 +563,13 @@ class HealthKitHostApiSetup { | @@ -540,11 +563,13 @@ class HealthKitHostApiSetup { | ||
| 540 | let args = message as! [Any?] | 563 | let args = message as! [Any?] |
| 541 | let startTimeArg = args[0] as! Int64 | 564 | let startTimeArg = args[0] as! Int64 |
| 542 | let endTimeArg = args[1] as! Int64 | 565 | let endTimeArg = args[1] as! Int64 |
| 543 | - do { | ||
| 544 | - let result = try api.fetchStepCountData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 545 | - reply(wrapResult(result)) | ||
| 546 | - } catch { | ||
| 547 | - reply(wrapError(error)) | 566 | + api.fetchStepCountData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 567 | + switch result { | ||
| 568 | + case .success(let res): | ||
| 569 | + reply(wrapResult(res)) | ||
| 570 | + case .failure(let error): | ||
| 571 | + reply(wrapError(error)) | ||
| 572 | + } | ||
| 548 | } | 573 | } |
| 549 | } | 574 | } |
| 550 | } else { | 575 | } else { |
| @@ -556,11 +581,13 @@ class HealthKitHostApiSetup { | @@ -556,11 +581,13 @@ class HealthKitHostApiSetup { | ||
| 556 | let args = message as! [Any?] | 581 | let args = message as! [Any?] |
| 557 | let startTimeArg = args[0] as! Int64 | 582 | let startTimeArg = args[0] as! Int64 |
| 558 | let endTimeArg = args[1] as! Int64 | 583 | let endTimeArg = args[1] as! Int64 |
| 559 | - do { | ||
| 560 | - let result = try api.fetchSleepData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 561 | - reply(wrapResult(result)) | ||
| 562 | - } catch { | ||
| 563 | - reply(wrapError(error)) | 584 | + api.fetchSleepData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 585 | + switch result { | ||
| 586 | + case .success(let res): | ||
| 587 | + reply(wrapResult(res)) | ||
| 588 | + case .failure(let error): | ||
| 589 | + reply(wrapError(error)) | ||
| 590 | + } | ||
| 564 | } | 591 | } |
| 565 | } | 592 | } |
| 566 | } else { | 593 | } else { |
| @@ -572,11 +599,13 @@ class HealthKitHostApiSetup { | @@ -572,11 +599,13 @@ class HealthKitHostApiSetup { | ||
| 572 | let args = message as! [Any?] | 599 | let args = message as! [Any?] |
| 573 | let startTimeArg = args[0] as! Int64 | 600 | let startTimeArg = args[0] as! Int64 |
| 574 | let endTimeArg = args[1] as! Int64 | 601 | let endTimeArg = args[1] as! Int64 |
| 575 | - do { | ||
| 576 | - let result = try api.fetchSleepingWristTemperatureData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 577 | - reply(wrapResult(result)) | ||
| 578 | - } catch { | ||
| 579 | - reply(wrapError(error)) | 602 | + api.fetchSleepingWristTemperatureData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 603 | + switch result { | ||
| 604 | + case .success(let res): | ||
| 605 | + reply(wrapResult(res)) | ||
| 606 | + case .failure(let error): | ||
| 607 | + reply(wrapError(error)) | ||
| 608 | + } | ||
| 580 | } | 609 | } |
| 581 | } | 610 | } |
| 582 | } else { | 611 | } else { |
| @@ -588,11 +617,13 @@ class HealthKitHostApiSetup { | @@ -588,11 +617,13 @@ class HealthKitHostApiSetup { | ||
| 588 | let args = message as! [Any?] | 617 | let args = message as! [Any?] |
| 589 | let startTimeArg = args[0] as! Int64 | 618 | let startTimeArg = args[0] as! Int64 |
| 590 | let endTimeArg = args[1] as! Int64 | 619 | let endTimeArg = args[1] as! Int64 |
| 591 | - do { | ||
| 592 | - let result = try api.fetchRespiratoryRateData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 593 | - reply(wrapResult(result)) | ||
| 594 | - } catch { | ||
| 595 | - reply(wrapError(error)) | 620 | + api.fetchRespiratoryRateData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 621 | + switch result { | ||
| 622 | + case .success(let res): | ||
| 623 | + reply(wrapResult(res)) | ||
| 624 | + case .failure(let error): | ||
| 625 | + reply(wrapError(error)) | ||
| 626 | + } | ||
| 596 | } | 627 | } |
| 597 | } | 628 | } |
| 598 | } else { | 629 | } else { |
| @@ -604,11 +635,13 @@ class HealthKitHostApiSetup { | @@ -604,11 +635,13 @@ class HealthKitHostApiSetup { | ||
| 604 | let args = message as! [Any?] | 635 | let args = message as! [Any?] |
| 605 | let startTimeArg = args[0] as! Int64 | 636 | let startTimeArg = args[0] as! Int64 |
| 606 | let endTimeArg = args[1] as! Int64 | 637 | let endTimeArg = args[1] as! Int64 |
| 607 | - do { | ||
| 608 | - let result = try api.fetchIrregularHeartRhythmData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 609 | - reply(wrapResult(result)) | ||
| 610 | - } catch { | ||
| 611 | - reply(wrapError(error)) | 638 | + api.fetchIrregularHeartRhythmData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 639 | + switch result { | ||
| 640 | + case .success(let res): | ||
| 641 | + reply(wrapResult(res)) | ||
| 642 | + case .failure(let error): | ||
| 643 | + reply(wrapError(error)) | ||
| 644 | + } | ||
| 612 | } | 645 | } |
| 613 | } | 646 | } |
| 614 | } else { | 647 | } else { |
| @@ -620,11 +653,13 @@ class HealthKitHostApiSetup { | @@ -620,11 +653,13 @@ class HealthKitHostApiSetup { | ||
| 620 | let args = message as! [Any?] | 653 | let args = message as! [Any?] |
| 621 | let startTimeArg = args[0] as! Int64 | 654 | let startTimeArg = args[0] as! Int64 |
| 622 | let endTimeArg = args[1] as! Int64 | 655 | let endTimeArg = args[1] as! Int64 |
| 623 | - do { | ||
| 624 | - let result = try api.fetchActivityTargetData(startTime: startTimeArg, endTime: endTimeArg) | ||
| 625 | - reply(wrapResult(result)) | ||
| 626 | - } catch { | ||
| 627 | - reply(wrapError(error)) | 656 | + api.fetchActivityTargetData(startTime: startTimeArg, endTime: endTimeArg) { result in |
| 657 | + switch result { | ||
| 658 | + case .success(let res): | ||
| 659 | + reply(wrapResult(res)) | ||
| 660 | + case .failure(let error): | ||
| 661 | + reply(wrapError(error)) | ||
| 662 | + } | ||
| 628 | } | 663 | } |
| 629 | } | 664 | } |
| 630 | } else { | 665 | } else { |
| @@ -7,15 +7,17 @@ final class HealthKitHostApiImpl: HealthKitHostApi { | @@ -7,15 +7,17 @@ final class HealthKitHostApiImpl: HealthKitHostApi { | ||
| 7 | self.service = service | 7 | self.service = service |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | - func checkHealthAppAuthorization() throws -> Bool { | ||
| 11 | - service.isHealthDataAvailable && !runBlocking { | ||
| 12 | - await self.service.shouldRequestAuthorization() | 10 | + func checkHealthAppAuthorization(completion: @escaping (Result<Bool, Error>) -> Void) { |
| 11 | + Task { | ||
| 12 | + let shouldAuth = await service.shouldRequestAuthorization() | ||
| 13 | + let isAuthorized = service.isHealthDataAvailable && !shouldAuth | ||
| 14 | + completion(.success(isAuthorized)) | ||
| 13 | } | 15 | } |
| 14 | } | 16 | } |
| 15 | 17 | ||
| 16 | - func getHealthServerAuthUrl() throws -> String { | 18 | + func getHealthServerAuthUrl(completion: @escaping (Result<String, Error>) -> Void) { |
| 17 | // Apple Health authorization is system-managed, not URL based. | 19 | // Apple Health authorization is system-managed, not URL based. |
| 18 | - "" | 20 | + completion(.success("")) |
| 19 | } | 21 | } |
| 20 | 22 | ||
| 21 | func requestHealthClientAuthorization() throws -> Bool { | 23 | func requestHealthClientAuthorization() throws -> Bool { |
| @@ -50,99 +52,113 @@ final class HealthKitHostApiImpl: HealthKitHostApi { | @@ -50,99 +52,113 @@ final class HealthKitHostApiImpl: HealthKitHostApi { | ||
| 50 | ) | 52 | ) |
| 51 | } | 53 | } |
| 52 | 54 | ||
| 53 | - func fetchHrvData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 54 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchHrvData) | 55 | + func fetchHrvData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 56 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchHrvData, completion: completion) | ||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | - func fetchHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 58 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchHeartRateData) | 59 | + func fetchHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 60 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchHeartRateData, completion: completion) | ||
| 59 | } | 61 | } |
| 60 | 62 | ||
| 61 | - func fetchWalkingHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 62 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchWalkingHeartRateData) | 63 | + func fetchWalkingHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 64 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchWalkingHeartRateData, completion: completion) | ||
| 63 | } | 65 | } |
| 64 | 66 | ||
| 65 | - func fetchRestingHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 66 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchRestingHeartRateData) | 67 | + func fetchRestingHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 68 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchRestingHeartRateData, completion: completion) | ||
| 67 | } | 69 | } |
| 68 | 70 | ||
| 69 | - func fetchSleepingHeartRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 70 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchSleepingHeartRateData) | 71 | + func fetchSleepingHeartRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 72 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchSleepingHeartRateData, completion: completion) | ||
| 71 | } | 73 | } |
| 72 | 74 | ||
| 73 | - func fetchOxygenSaturationData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 74 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchOxygenSaturationData) | 75 | + func fetchOxygenSaturationData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 76 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchOxygenSaturationData, completion: completion) | ||
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | - func fetchActiveEnergyData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 78 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchActiveEnergyData) | 79 | + func fetchActiveEnergyData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 80 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchActiveEnergyData, completion: completion) | ||
| 79 | } | 81 | } |
| 80 | 82 | ||
| 81 | - func fetchExerciseData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 82 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchExerciseData) | 83 | + func fetchExerciseData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 84 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchExerciseData, completion: completion) | ||
| 83 | } | 85 | } |
| 84 | 86 | ||
| 85 | - func fetchStandData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 86 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchStandData) | 87 | + func fetchStandData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 88 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchStandData, completion: completion) | ||
| 87 | } | 89 | } |
| 88 | 90 | ||
| 89 | - func fetchStepCountData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 90 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchStepCountData) | 91 | + func fetchStepCountData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 92 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchStepCountData, completion: completion) | ||
| 91 | } | 93 | } |
| 92 | 94 | ||
| 93 | - func fetchSleepData(startTime: Int64, endTime: Int64) throws -> [HealthSleepUploadDataPoint] { | 95 | + func fetchSleepData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthSleepUploadDataPoint], Error>) -> Void) { |
| 94 | let range = makeDateRange(startTime: startTime, endTime: endTime) | 96 | let range = makeDateRange(startTime: startTime, endTime: endTime) |
| 95 | - let intervals = try runBlockingThrows { | ||
| 96 | - try await self.service.fetchSleepData(startDate: range.startDate, endDate: range.endDate) | ||
| 97 | - } | ||
| 98 | - return intervals.map { interval in | ||
| 99 | - HealthSleepUploadDataPoint( | ||
| 100 | - dataType: Int64(interval.dataType), | ||
| 101 | - fromTime: Int64(interval.fromTime.rounded()), | ||
| 102 | - toTime: Int64(interval.toTime.rounded()) | ||
| 103 | - ) | 97 | + Task { |
| 98 | + do { | ||
| 99 | + let intervals = try await service.fetchSleepData(startDate: range.startDate, endDate: range.endDate) | ||
| 100 | + completion(.success(intervals.map { interval in | ||
| 101 | + HealthSleepUploadDataPoint( | ||
| 102 | + dataType: Int64(interval.dataType), | ||
| 103 | + fromTime: Int64(interval.fromTime.rounded()), | ||
| 104 | + toTime: Int64(interval.toTime.rounded()) | ||
| 105 | + ) | ||
| 106 | + })) | ||
| 107 | + } catch { | ||
| 108 | + completion(.failure(error)) | ||
| 109 | + } | ||
| 104 | } | 110 | } |
| 105 | } | 111 | } |
| 106 | 112 | ||
| 107 | - func fetchSleepingWristTemperatureData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 108 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchSleepingWristTemperatureData) | 113 | + func fetchSleepingWristTemperatureData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 114 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchSleepingWristTemperatureData, completion: completion) | ||
| 109 | } | 115 | } |
| 110 | 116 | ||
| 111 | - func fetchRespiratoryRateData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 112 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchRespiratoryRateData) | 117 | + func fetchRespiratoryRateData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 118 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchRespiratoryRateData, completion: completion) | ||
| 113 | } | 119 | } |
| 114 | 120 | ||
| 115 | - func fetchIrregularHeartRhythmData(startTime: Int64, endTime: Int64) throws -> [HealthUploadDataPoint] { | ||
| 116 | - try fetchCommon(startTime: startTime, endTime: endTime, service.fetchIrregularHeartRhythmData) | 121 | + func fetchIrregularHeartRhythmData(startTime: Int64, endTime: Int64, completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void) { |
| 122 | + fetchCommon(startTime: startTime, endTime: endTime, service.fetchIrregularHeartRhythmData, completion: completion) | ||
| 117 | } | 123 | } |
| 118 | 124 | ||
| 119 | - func fetchActivityTargetData(startTime: Int64, endTime: Int64) throws -> HealthActivityTargetData? { | 125 | + func fetchActivityTargetData(startTime: Int64, endTime: Int64, completion: @escaping (Result<HealthActivityTargetData?, Error>) -> Void) { |
| 120 | let range = makeDateRange(startTime: startTime, endTime: endTime) | 126 | let range = makeDateRange(startTime: startTime, endTime: endTime) |
| 121 | - let target = try runBlockingThrows { | ||
| 122 | - try await self.service.fetchActivityTargetData(startDate: range.startDate, endDate: range.endDate) | 127 | + Task { |
| 128 | + do { | ||
| 129 | + let target = try await service.fetchActivityTargetData(startDate: range.startDate, endDate: range.endDate) | ||
| 130 | + completion(.success(target.map { | ||
| 131 | + HealthActivityTargetData( | ||
| 132 | + move: $0.move.map(Int64.init), | ||
| 133 | + stand: $0.stand.map(Int64.init) | ||
| 134 | + ) | ||
| 135 | + })) | ||
| 136 | + } catch { | ||
| 137 | + completion(.failure(error)) | ||
| 138 | + } | ||
| 123 | } | 139 | } |
| 124 | - guard let target else { return nil } | ||
| 125 | - return HealthActivityTargetData( | ||
| 126 | - move: target.move.map(Int64.init), | ||
| 127 | - stand: target.stand.map(Int64.init) | ||
| 128 | - ) | ||
| 129 | } | 140 | } |
| 130 | 141 | ||
| 131 | private func fetchCommon( | 142 | private func fetchCommon( |
| 132 | startTime: Int64, | 143 | startTime: Int64, |
| 133 | endTime: Int64, | 144 | endTime: Int64, |
| 134 | - _ fetch: @escaping (Date, Date) async throws -> [NativeHealthDataPoint] | ||
| 135 | - ) throws -> [HealthUploadDataPoint] { | 145 | + _ fetch: @escaping (Date, Date) async throws -> [NativeHealthDataPoint], |
| 146 | + completion: @escaping (Result<[HealthUploadDataPoint], Error>) -> Void | ||
| 147 | + ) { | ||
| 136 | let range = makeDateRange(startTime: startTime, endTime: endTime) | 148 | let range = makeDateRange(startTime: startTime, endTime: endTime) |
| 137 | - let points = try runBlockingThrows { | ||
| 138 | - try await fetch(range.startDate, range.endDate) | ||
| 139 | - } | ||
| 140 | - return points.map { point in | ||
| 141 | - HealthUploadDataPoint( | ||
| 142 | - dataType: Int64(point.dataType.rawValue), | ||
| 143 | - time: Int64(point.time.rounded()), | ||
| 144 | - value: point.value | ||
| 145 | - ) | 149 | + Task { |
| 150 | + do { | ||
| 151 | + let points = try await fetch(range.startDate, range.endDate) | ||
| 152 | + completion(.success(points.map { point in | ||
| 153 | + HealthUploadDataPoint( | ||
| 154 | + dataType: Int64(point.dataType.rawValue), | ||
| 155 | + time: Int64(point.time.rounded()), | ||
| 156 | + value: point.value | ||
| 157 | + ) | ||
| 158 | + })) | ||
| 159 | + } catch { | ||
| 160 | + completion(.failure(error)) | ||
| 161 | + } | ||
| 146 | } | 162 | } |
| 147 | } | 163 | } |
| 148 | 164 |
| @@ -7,6 +7,7 @@ import 'package:doublefeel_flutter/app/apple_health_upload/models/upload_activit | @@ -7,6 +7,7 @@ import 'package:doublefeel_flutter/app/apple_health_upload/models/upload_activit | ||
| 7 | import 'package:doublefeel_flutter/app/apple_health_upload/models/upload_sleep.dart'; | 7 | import 'package:doublefeel_flutter/app/apple_health_upload/models/upload_sleep.dart'; |
| 8 | import 'package:doublefeel_flutter/core/util/app_toast.dart'; | 8 | import 'package:doublefeel_flutter/core/util/app_toast.dart'; |
| 9 | import 'package:doublefeel_flutter/pigeon/health_kit_api.g.dart'; | 9 | import 'package:doublefeel_flutter/pigeon/health_kit_api.g.dart'; |
| 10 | +import 'package:flutter/foundation.dart'; | ||
| 10 | import 'package:get/get.dart'; | 11 | import 'package:get/get.dart'; |
| 11 | 12 | ||
| 12 | class AppleHealthUploadTestController extends GetxController { | 13 | class AppleHealthUploadTestController extends GetxController { |
| @@ -28,6 +29,7 @@ class AppleHealthUploadTestController extends GetxController { | @@ -28,6 +29,7 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 28 | _appendLog('开始检测 AppleHealth 权限'); | 29 | _appendLog('开始检测 AppleHealth 权限'); |
| 29 | try { | 30 | try { |
| 30 | final hasPermission = await _hostApi.checkHealthAppAuthorization(); | 31 | final hasPermission = await _hostApi.checkHealthAppAuthorization(); |
| 32 | + _printHostApiResult('checkHealthAppAuthorization', hasPermission); | ||
| 31 | if (hasPermission) { | 33 | if (hasPermission) { |
| 32 | permissionTitle.value = '权限:已授权'; | 34 | permissionTitle.value = '权限:已授权'; |
| 33 | _appendLog('AppleHealth 权限已授权'); | 35 | _appendLog('AppleHealth 权限已授权'); |
| @@ -35,9 +37,11 @@ class AppleHealthUploadTestController extends GetxController { | @@ -35,9 +37,11 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 35 | } | 37 | } |
| 36 | 38 | ||
| 37 | final granted = await _hostApi.requestHealthClientAuthorization(); | 39 | final granted = await _hostApi.requestHealthClientAuthorization(); |
| 40 | + _printHostApiResult('requestHealthClientAuthorization', granted); | ||
| 38 | permissionTitle.value = granted ? '权限:已授权' : '权限:未授权'; | 41 | permissionTitle.value = granted ? '权限:已授权' : '权限:未授权'; |
| 39 | _appendLog('AppleHealth 授权请求结果:$granted'); | 42 | _appendLog('AppleHealth 授权请求结果:$granted'); |
| 40 | } catch (error, stackTrace) { | 43 | } catch (error, stackTrace) { |
| 44 | + _printHostApiError('healthAuthorization', error, stackTrace); | ||
| 41 | permissionTitle.value = '权限:检测失败'; | 45 | permissionTitle.value = '权限:检测失败'; |
| 42 | _appendLog('权限检测失败:$error'); | 46 | _appendLog('权限检测失败:$error'); |
| 43 | _appendLog(stackTrace.toString()); | 47 | _appendLog(stackTrace.toString()); |
| @@ -54,7 +58,7 @@ class AppleHealthUploadTestController extends GetxController { | @@ -54,7 +58,7 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 54 | 58 | ||
| 55 | final endTime = DateTime.now().millisecondsSinceEpoch ~/ 1000; | 59 | final endTime = DateTime.now().millisecondsSinceEpoch ~/ 1000; |
| 56 | final startTime = DateTime.now() | 60 | final startTime = DateTime.now() |
| 57 | - .subtract(const Duration(days: 7)) | 61 | + .subtract(const Duration(days: 365 * 2)) |
| 58 | .millisecondsSinceEpoch ~/ | 62 | .millisecondsSinceEpoch ~/ |
| 59 | 1000; | 63 | 1000; |
| 60 | _appendLog('同步范围:$startTime -> $endTime'); | 64 | _appendLog('同步范围:$startTime -> $endTime'); |
| @@ -163,7 +167,15 @@ class AppleHealthUploadTestController extends GetxController { | @@ -163,7 +167,15 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 163 | required String label, | 167 | required String label, |
| 164 | required Future<List<HealthUploadDataPoint>> Function() fetch, | 168 | required Future<List<HealthUploadDataPoint>> Function() fetch, |
| 165 | }) async { | 169 | }) async { |
| 166 | - final points = await fetch(); | 170 | + late final List<HealthUploadDataPoint> points; |
| 171 | + try { | ||
| 172 | + points = await fetch(); | ||
| 173 | + _printHostApiResult(label, points); | ||
| 174 | + } catch (error, stackTrace) { | ||
| 175 | + _printHostApiError(label, error, stackTrace); | ||
| 176 | + rethrow; | ||
| 177 | + } | ||
| 178 | + | ||
| 167 | final models = points | 179 | final models = points |
| 168 | .map((point) => point.toAppleHealthUploadSample()) | 180 | .map((point) => point.toAppleHealthUploadSample()) |
| 169 | .whereType<AppleHealthUploadSample>() | 181 | .whereType<AppleHealthUploadSample>() |
| @@ -173,7 +185,15 @@ class AppleHealthUploadTestController extends GetxController { | @@ -173,7 +185,15 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 173 | } | 185 | } |
| 174 | 186 | ||
| 175 | Future<void> _fetchSleep(int startTime, int endTime) async { | 187 | Future<void> _fetchSleep(int startTime, int endTime) async { |
| 176 | - final points = await _hostApi.fetchSleepData(startTime, endTime); | 188 | + late final List<HealthSleepUploadDataPoint> points; |
| 189 | + try { | ||
| 190 | + points = await _hostApi.fetchSleepData(startTime, endTime); | ||
| 191 | + _printHostApiResult('sleep', points); | ||
| 192 | + } catch (error, stackTrace) { | ||
| 193 | + _printHostApiError('sleep', error, stackTrace); | ||
| 194 | + rethrow; | ||
| 195 | + } | ||
| 196 | + | ||
| 177 | final models = | 197 | final models = |
| 178 | points.map((item) => item.toHealthSleepUploadData()).toList(); | 198 | points.map((item) => item.toHealthSleepUploadData()).toList(); |
| 179 | _sleepData.addAll(models); | 199 | _sleepData.addAll(models); |
| @@ -181,7 +201,15 @@ class AppleHealthUploadTestController extends GetxController { | @@ -181,7 +201,15 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 181 | } | 201 | } |
| 182 | 202 | ||
| 183 | Future<void> _fetchActivityTarget(int startTime, int endTime) async { | 203 | Future<void> _fetchActivityTarget(int startTime, int endTime) async { |
| 184 | - final target = await _hostApi.fetchActivityTargetData(startTime, endTime); | 204 | + late final HealthActivityTargetData? target; |
| 205 | + try { | ||
| 206 | + target = await _hostApi.fetchActivityTargetData(startTime, endTime); | ||
| 207 | + _printHostApiResult('activityTarget', target); | ||
| 208 | + } catch (error, stackTrace) { | ||
| 209 | + _printHostApiError('activityTarget', error, stackTrace); | ||
| 210 | + rethrow; | ||
| 211 | + } | ||
| 212 | + | ||
| 185 | if (target != null) { | 213 | if (target != null) { |
| 186 | _activityTarget = HealthActivityTargetUploadData( | 214 | _activityTarget = HealthActivityTargetUploadData( |
| 187 | move: target.move, | 215 | move: target.move, |
| @@ -202,6 +230,65 @@ class AppleHealthUploadTestController extends GetxController { | @@ -202,6 +230,65 @@ class AppleHealthUploadTestController extends GetxController { | ||
| 202 | } | 230 | } |
| 203 | } | 231 | } |
| 204 | 232 | ||
| 233 | + void _printHostApiResult(String label, Object? value) { | ||
| 234 | + debugPrint( | ||
| 235 | + '[AppleHealthUploadTest][_hostApi.$label] result=' | ||
| 236 | + '${_stringifyHostApiValue(value)}', | ||
| 237 | + wrapWidth: 1024, | ||
| 238 | + ); | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + void _printHostApiError( | ||
| 242 | + String label, | ||
| 243 | + Object error, | ||
| 244 | + StackTrace stackTrace, | ||
| 245 | + ) { | ||
| 246 | + debugPrint( | ||
| 247 | + '[AppleHealthUploadTest][_hostApi.$label] error=$error\n$stackTrace', | ||
| 248 | + wrapWidth: 1024, | ||
| 249 | + ); | ||
| 250 | + } | ||
| 251 | + | ||
| 252 | + String _stringifyHostApiValue(Object? value) { | ||
| 253 | + try { | ||
| 254 | + return jsonEncode(_hostApiValueToJson(value)); | ||
| 255 | + } catch (_) { | ||
| 256 | + return value.toString(); | ||
| 257 | + } | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + Object? _hostApiValueToJson(Object? value) { | ||
| 261 | + if (value is HealthUploadDataPoint) { | ||
| 262 | + return { | ||
| 263 | + 'dataType': value.dataType, | ||
| 264 | + 'time': value.time, | ||
| 265 | + 'value': value.value, | ||
| 266 | + }; | ||
| 267 | + } | ||
| 268 | + if (value is HealthSleepUploadDataPoint) { | ||
| 269 | + return { | ||
| 270 | + 'dataType': value.dataType, | ||
| 271 | + 'fromTime': value.fromTime, | ||
| 272 | + 'toTime': value.toTime, | ||
| 273 | + }; | ||
| 274 | + } | ||
| 275 | + if (value is HealthActivityTargetData) { | ||
| 276 | + return { | ||
| 277 | + 'move': value.move, | ||
| 278 | + 'stand': value.stand, | ||
| 279 | + }; | ||
| 280 | + } | ||
| 281 | + if (value is List) { | ||
| 282 | + return value.map(_hostApiValueToJson).toList(); | ||
| 283 | + } | ||
| 284 | + if (value is Map) { | ||
| 285 | + return value.map( | ||
| 286 | + (key, item) => MapEntry(key.toString(), _hostApiValueToJson(item)), | ||
| 287 | + ); | ||
| 288 | + } | ||
| 289 | + return value; | ||
| 290 | + } | ||
| 291 | + | ||
| 205 | void _appendLog(String message) { | 292 | void _appendLog(String message) { |
| 206 | final time = DateTime.now().toIso8601String(); | 293 | final time = DateTime.now().toIso8601String(); |
| 207 | logText.value = '${logText.value}[$time] $message\n'; | 294 | logText.value = '${logText.value}[$time] $message\n'; |
| @@ -107,7 +107,7 @@ class _BottomButton extends StatelessWidget { | @@ -107,7 +107,7 @@ class _BottomButton extends StatelessWidget { | ||
| 107 | maxLines: 1, | 107 | maxLines: 1, |
| 108 | overflow: TextOverflow.ellipsis, | 108 | overflow: TextOverflow.ellipsis, |
| 109 | textAlign: TextAlign.center, | 109 | textAlign: TextAlign.center, |
| 110 | - style: const TextStyle(fontSize: 13), | 110 | + style: const TextStyle(fontSize: 12), |
| 111 | ), | 111 | ), |
| 112 | ), | 112 | ), |
| 113 | ); | 113 | ); |
| @@ -62,7 +62,8 @@ import 'app_localizations_zh.dart'; | @@ -62,7 +62,8 @@ import 'app_localizations_zh.dart'; | ||
| 62 | /// be consistent with the languages listed in the AppLocalizations.supportedLocales | 62 | /// be consistent with the languages listed in the AppLocalizations.supportedLocales |
| 63 | /// property. | 63 | /// property. |
| 64 | abstract class AppLocalizations { | 64 | abstract class AppLocalizations { |
| 65 | - AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); | 65 | + AppLocalizations(String locale) |
| 66 | + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); | ||
| 66 | 67 | ||
| 67 | final String localeName; | 68 | final String localeName; |
| 68 | 69 | ||
| @@ -70,7 +71,8 @@ abstract class AppLocalizations { | @@ -70,7 +71,8 @@ abstract class AppLocalizations { | ||
| 70 | return Localizations.of<AppLocalizations>(context, AppLocalizations); | 71 | return Localizations.of<AppLocalizations>(context, AppLocalizations); |
| 71 | } | 72 | } |
| 72 | 73 | ||
| 73 | - static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate(); | 74 | + static const LocalizationsDelegate<AppLocalizations> delegate = |
| 75 | + _AppLocalizationsDelegate(); | ||
| 74 | 76 | ||
| 75 | /// A list of this localizations delegate along with the default localizations | 77 | /// A list of this localizations delegate along with the default localizations |
| 76 | /// delegates. | 78 | /// delegates. |
| @@ -82,7 +84,8 @@ abstract class AppLocalizations { | @@ -82,7 +84,8 @@ abstract class AppLocalizations { | ||
| 82 | /// Additional delegates can be added by appending to this list in | 84 | /// Additional delegates can be added by appending to this list in |
| 83 | /// MaterialApp. This list does not have to be used at all if a custom list | 85 | /// MaterialApp. This list does not have to be used at all if a custom list |
| 84 | /// of delegates is preferred or required. | 86 | /// of delegates is preferred or required. |
| 85 | - static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[ | 87 | + static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = |
| 88 | + <LocalizationsDelegate<dynamic>>[ | ||
| 86 | delegate, | 89 | delegate, |
| 87 | GlobalMaterialLocalizations.delegate, | 90 | GlobalMaterialLocalizations.delegate, |
| 88 | GlobalCupertinoLocalizations.delegate, | 91 | GlobalCupertinoLocalizations.delegate, |
| @@ -525,7 +528,8 @@ abstract class AppLocalizations { | @@ -525,7 +528,8 @@ abstract class AppLocalizations { | ||
| 525 | /// | 528 | /// |
| 526 | /// In zh, this message translates to: | 529 | /// In zh, this message translates to: |
| 527 | /// **'你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'** | 530 | /// **'你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'** |
| 528 | - String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired; | 531 | + String |
| 532 | + get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired; | ||
| 529 | 533 | ||
| 530 | /// No description provided for @bindPartnerTitle. | 534 | /// No description provided for @bindPartnerTitle. |
| 531 | /// | 535 | /// |
| @@ -1734,7 +1738,8 @@ abstract class AppLocalizations { | @@ -1734,7 +1738,8 @@ abstract class AppLocalizations { | ||
| 1734 | String get dailyActions; | 1738 | String get dailyActions; |
| 1735 | } | 1739 | } |
| 1736 | 1740 | ||
| 1737 | -class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { | 1741 | +class _AppLocalizationsDelegate |
| 1742 | + extends LocalizationsDelegate<AppLocalizations> { | ||
| 1738 | const _AppLocalizationsDelegate(); | 1743 | const _AppLocalizationsDelegate(); |
| 1739 | 1744 | ||
| 1740 | @override | 1745 | @override |
| @@ -1743,25 +1748,25 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> | @@ -1743,25 +1748,25 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> | ||
| 1743 | } | 1748 | } |
| 1744 | 1749 | ||
| 1745 | @override | 1750 | @override |
| 1746 | - bool isSupported(Locale locale) => <String>['en', 'zh'].contains(locale.languageCode); | 1751 | + bool isSupported(Locale locale) => |
| 1752 | + <String>['en', 'zh'].contains(locale.languageCode); | ||
| 1747 | 1753 | ||
| 1748 | @override | 1754 | @override |
| 1749 | bool shouldReload(_AppLocalizationsDelegate old) => false; | 1755 | bool shouldReload(_AppLocalizationsDelegate old) => false; |
| 1750 | } | 1756 | } |
| 1751 | 1757 | ||
| 1752 | AppLocalizations lookupAppLocalizations(Locale locale) { | 1758 | AppLocalizations lookupAppLocalizations(Locale locale) { |
| 1753 | - | ||
| 1754 | - | ||
| 1755 | // Lookup logic when only language code is specified. | 1759 | // Lookup logic when only language code is specified. |
| 1756 | switch (locale.languageCode) { | 1760 | switch (locale.languageCode) { |
| 1757 | - case 'en': return AppLocalizationsEn(); | ||
| 1758 | - case 'zh': return AppLocalizationsZh(); | 1761 | + case 'en': |
| 1762 | + return AppLocalizationsEn(); | ||
| 1763 | + case 'zh': | ||
| 1764 | + return AppLocalizationsZh(); | ||
| 1759 | } | 1765 | } |
| 1760 | 1766 | ||
| 1761 | throw FlutterError( | 1767 | throw FlutterError( |
| 1762 | - 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' | ||
| 1763 | - 'an issue with the localizations generation tool. Please file an issue ' | ||
| 1764 | - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' | ||
| 1765 | - 'that was used.' | ||
| 1766 | - ); | 1768 | + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' |
| 1769 | + 'an issue with the localizations generation tool. Please file an issue ' | ||
| 1770 | + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' | ||
| 1771 | + 'that was used.'); | ||
| 1767 | } | 1772 | } |
| 1 | +// ignore: unused_import | ||
| 2 | +import 'package:intl/intl.dart' as intl; | ||
| 1 | import 'app_localizations.dart'; | 3 | import 'app_localizations.dart'; |
| 2 | 4 | ||
| 3 | // ignore_for_file: type=lint | 5 | // ignore_for_file: type=lint |
| @@ -67,10 +69,12 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -67,10 +69,12 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 67 | String get settings => 'Settings'; | 69 | String get settings => 'Settings'; |
| 68 | 70 | ||
| 69 | @override | 71 | @override |
| 70 | - String get onboardingIntroTitle => 'DoubleFeel is a health companion app built for Apple Watch'; | 72 | + String get onboardingIntroTitle => |
| 73 | + 'DoubleFeel is a health companion app built for Apple Watch'; | ||
| 71 | 74 | ||
| 72 | @override | 75 | @override |
| 73 | - String get onboardingIntroBody => 'We hope to help you\n<em>notice changes in your mind and body, and help the people who love you</em> see when you are <em>tired or need support</em>'; | 76 | + String get onboardingIntroBody => |
| 77 | + 'We hope to help you\n<em>notice changes in your mind and body, and help the people who love you</em> see when you are <em>tired or need support</em>'; | ||
| 74 | 78 | ||
| 75 | @override | 79 | @override |
| 76 | String get onboardingStateQuestion => 'Which of these often happens to you?'; | 80 | String get onboardingStateQuestion => 'Which of these often happens to you?'; |
| @@ -82,16 +86,19 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -82,16 +86,19 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 82 | String get onboardingStateTired => 'I get tired easily'; | 86 | String get onboardingStateTired => 'I get tired easily'; |
| 83 | 87 | ||
| 84 | @override | 88 | @override |
| 85 | - String get onboardingStatePoorRest => 'I wake up but still do not feel rested'; | 89 | + String get onboardingStatePoorRest => |
| 90 | + 'I wake up but still do not feel rested'; | ||
| 86 | 91 | ||
| 87 | @override | 92 | @override |
| 88 | - String get onboardingStateNeedStimulants => 'I rely on cigarettes, alcohol, coffee, or other stimulants to stay alert'; | 93 | + String get onboardingStateNeedStimulants => |
| 94 | + 'I rely on cigarettes, alcohol, coffee, or other stimulants to stay alert'; | ||
| 89 | 95 | ||
| 90 | @override | 96 | @override |
| 91 | String get onboardingStateNone => 'None of the above'; | 97 | String get onboardingStateNone => 'None of the above'; |
| 92 | 98 | ||
| 93 | @override | 99 | @override |
| 94 | - String get onboardingStressGoalQuestion => 'What do you want to learn by understanding stress?'; | 100 | + String get onboardingStressGoalQuestion => |
| 101 | + 'What do you want to learn by understanding stress?'; | ||
| 95 | 102 | ||
| 96 | @override | 103 | @override |
| 97 | String get onboardingStressGoalSource => 'Understand where stress comes from'; | 104 | String get onboardingStressGoalSource => 'Understand where stress comes from'; |
| @@ -100,7 +107,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -100,7 +107,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 100 | String get onboardingStressGoalReminder => 'Get reminded when stress appears'; | 107 | String get onboardingStressGoalReminder => 'Get reminded when stress appears'; |
| 101 | 108 | ||
| 102 | @override | 109 | @override |
| 103 | - String get onboardingStressGoalLovedOnes => 'Let people who care about me know my stress state'; | 110 | + String get onboardingStressGoalLovedOnes => |
| 111 | + 'Let people who care about me know my stress state'; | ||
| 104 | 112 | ||
| 105 | @override | 113 | @override |
| 106 | String get onboardingStressGoalRelax => 'Understand stress and feel lighter'; | 114 | String get onboardingStressGoalRelax => 'Understand stress and feel lighter'; |
| @@ -109,7 +117,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -109,7 +117,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 109 | String get onboardingStressGoalBodyTalk => 'Communicate better with my body'; | 117 | String get onboardingStressGoalBodyTalk => 'Communicate better with my body'; |
| 110 | 118 | ||
| 111 | @override | 119 | @override |
| 112 | - String get onboardingReliefQuestion => 'Which methods do you think can ease stress?'; | 120 | + String get onboardingReliefQuestion => |
| 121 | + 'Which methods do you think can ease stress?'; | ||
| 113 | 122 | ||
| 114 | @override | 123 | @override |
| 115 | String get onboardingReliefSleep => 'Regular sleep'; | 124 | String get onboardingReliefSleep => 'Regular sleep'; |
| @@ -133,7 +142,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -133,7 +142,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 133 | String get onboardingKeyDataTitle => 'Did you know?'; | 142 | String get onboardingKeyDataTitle => 'Did you know?'; |
| 134 | 143 | ||
| 135 | @override | 144 | @override |
| 136 | - String get onboardingKeyDataSubtitle => 'Everyone has a magical and important body metric that can help us:'; | 145 | + String get onboardingKeyDataSubtitle => |
| 146 | + 'Everyone has a magical and important body metric that can help us:'; | ||
| 137 | 147 | ||
| 138 | @override | 148 | @override |
| 139 | String get onboardingKeyDataStress => 'Monitor stress'; | 149 | String get onboardingKeyDataStress => 'Monitor stress'; |
| @@ -148,7 +158,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -148,7 +158,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 148 | String get onboardingKeyDataHabits => 'Build healthy habits'; | 158 | String get onboardingKeyDataHabits => 'Build healthy habits'; |
| 149 | 159 | ||
| 150 | @override | 160 | @override |
| 151 | - String get onboardingKeyDataLovedOnes => 'Help important people care about your state in time'; | 161 | + String get onboardingKeyDataLovedOnes => |
| 162 | + 'Help important people care about your state in time'; | ||
| 152 | 163 | ||
| 153 | @override | 164 | @override |
| 154 | String get onboardingTellMeWhatItIs => 'Tell me what it is!'; | 165 | String get onboardingTellMeWhatItIs => 'Tell me what it is!'; |
| @@ -157,16 +168,19 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -157,16 +168,19 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 157 | String get onboardingHrvTitle => 'It is HRV, heart rate variability'; | 168 | String get onboardingHrvTitle => 'It is HRV, heart rate variability'; |
| 158 | 169 | ||
| 159 | @override | 170 | @override |
| 160 | - String get onboardingHrvSubtitle => 'It helps us measure overall stress and health'; | 171 | + String get onboardingHrvSubtitle => |
| 172 | + 'It helps us measure overall stress and health'; | ||
| 161 | 173 | ||
| 162 | @override | 174 | @override |
| 163 | - String get onboardingHrvDescription => 'Heart rate variability (HRV) is the tiny variation in time between heartbeats. It reflects autonomic nervous system activity and how the body responds to stress.'; | 175 | + String get onboardingHrvDescription => |
| 176 | + 'Heart rate variability (HRV) is the tiny variation in time between heartbeats. It reflects autonomic nervous system activity and how the body responds to stress.'; | ||
| 164 | 177 | ||
| 165 | @override | 178 | @override |
| 166 | String get onboardingTellMeMore => 'Tell me more'; | 179 | String get onboardingTellMeMore => 'Tell me more'; |
| 167 | 180 | ||
| 168 | @override | 181 | @override |
| 169 | - String get onboardingResearchTitle => 'Many studies show that HRV changes are closely related to how our body and mind feel'; | 182 | + String get onboardingResearchTitle => |
| 183 | + 'Many studies show that HRV changes are closely related to how our body and mind feel'; | ||
| 170 | 184 | ||
| 171 | @override | 185 | @override |
| 172 | String get onboardingResearchFatigue => 'Physical fatigue'; | 186 | String get onboardingResearchFatigue => 'Physical fatigue'; |
| @@ -184,25 +198,30 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -184,25 +198,30 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 184 | String get onboardingHealthPermissionTitle => 'Allow health data access'; | 198 | String get onboardingHealthPermissionTitle => 'Allow health data access'; |
| 185 | 199 | ||
| 186 | @override | 200 | @override |
| 187 | - String get onboardingHealthPermissionBody => 'DoubleFeel needs connected wearable health data to send reminders, count stress moments, and provide suggestions.'; | 201 | + String get onboardingHealthPermissionBody => |
| 202 | + 'DoubleFeel needs connected wearable health data to send reminders, count stress moments, and provide suggestions.'; | ||
| 188 | 203 | ||
| 189 | @override | 204 | @override |
| 190 | - String get onboardingHealthPermissionPrivacy => 'Your health data is stored locally. We do not upload any related data.'; | 205 | + String get onboardingHealthPermissionPrivacy => |
| 206 | + 'Your health data is stored locally. We do not upload any related data.'; | ||
| 191 | 207 | ||
| 192 | @override | 208 | @override |
| 193 | String get onboardingNotificationTitle => 'Turn on notifications'; | 209 | String get onboardingNotificationTitle => 'Turn on notifications'; |
| 194 | 210 | ||
| 195 | @override | 211 | @override |
| 196 | - String get onboardingNotificationSubtitle => 'Learn about every body change in time'; | 212 | + String get onboardingNotificationSubtitle => |
| 213 | + 'Learn about every body change in time'; | ||
| 197 | 214 | ||
| 198 | @override | 215 | @override |
| 199 | - String get onboardingNotificationBody => 'After Apple Watch data updates, we can remind you in time and help you act to improve your stress state.'; | 216 | + String get onboardingNotificationBody => |
| 217 | + 'After Apple Watch data updates, we can remind you in time and help you act to improve your stress state.'; | ||
| 200 | 218 | ||
| 201 | @override | 219 | @override |
| 202 | String get onboardingMemberTitle => 'Get an annual membership offer'; | 220 | String get onboardingMemberTitle => 'Get an annual membership offer'; |
| 203 | 221 | ||
| 204 | @override | 222 | @override |
| 205 | - String get onboardingMemberBody => 'Start your pressure alert and health companion journey, so love and care are always present.'; | 223 | + String get onboardingMemberBody => |
| 224 | + 'Start your pressure alert and health companion journey, so love and care are always present.'; | ||
| 206 | 225 | ||
| 207 | @override | 226 | @override |
| 208 | String get onboardingMemberOriginalPrice => 'Original ¥72.00/year'; | 227 | String get onboardingMemberOriginalPrice => 'Original ¥72.00/year'; |
| @@ -217,13 +236,16 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -217,13 +236,16 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 217 | String get onboardingMemberAllOptions => 'View all purchase options'; | 236 | String get onboardingMemberAllOptions => 'View all purchase options'; |
| 218 | 237 | ||
| 219 | @override | 238 | @override |
| 220 | - String get healthCompanionIsNowAvailable => 'Health Companion is now available'; | 239 | + String get healthCompanionIsNowAvailable => |
| 240 | + 'Health Companion is now available'; | ||
| 221 | 241 | ||
| 222 | @override | 242 | @override |
| 223 | - String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => 'You can now view each other\'s HRV, stress levels, and sleep patterns, and reach out to check in when the other person seems tired.'; | 243 | + String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => |
| 244 | + 'You can now view each other\'s HRV, stress levels, and sleep patterns, and reach out to check in when the other person seems tired.'; | ||
| 224 | 245 | ||
| 225 | @override | 246 | @override |
| 226 | - String get bindPartnerTitle => 'Add a Close Contact\nOne more person to care about your health'; | 247 | + String get bindPartnerTitle => |
| 248 | + 'Add a Close Contact\nOne more person to care about your health'; | ||
| 227 | 249 | ||
| 228 | @override | 250 | @override |
| 229 | String get bindPartnerMyId => 'My ID'; | 251 | String get bindPartnerMyId => 'My ID'; |
| @@ -262,7 +284,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -262,7 +284,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 262 | String get onboardingResearchGoodSleep => 'Good Sleep'; | 284 | String get onboardingResearchGoodSleep => 'Good Sleep'; |
| 263 | 285 | ||
| 264 | @override | 286 | @override |
| 265 | - String get loginSlogan => 'Start your pressure alert and health companion journey\nso love and care are always present'; | 287 | + String get loginSlogan => |
| 288 | + 'Start your pressure alert and health companion journey\nso love and care are always present'; | ||
| 266 | 289 | ||
| 267 | @override | 290 | @override |
| 268 | String get loginWithPhone => 'Sign in with Phone'; | 291 | String get loginWithPhone => 'Sign in with Phone'; |
| @@ -312,13 +335,15 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -312,13 +335,15 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 312 | String get phoneLoginCodeHint => 'Enter verification code'; | 335 | String get phoneLoginCodeHint => 'Enter verification code'; |
| 313 | 336 | ||
| 314 | @override | 337 | @override |
| 315 | - String get phoneLoginAutoRegisterHint => 'Unregistered numbers will be registered automatically'; | 338 | + String get phoneLoginAutoRegisterHint => |
| 339 | + 'Unregistered numbers will be registered automatically'; | ||
| 316 | 340 | ||
| 317 | @override | 341 | @override |
| 318 | String get phoneLoginLoggingIn => 'Signing in...'; | 342 | String get phoneLoginLoggingIn => 'Signing in...'; |
| 319 | 343 | ||
| 320 | @override | 344 | @override |
| 321 | - String get loginAgreeToTermsToast => 'Please read and agree to the Terms of Service and Privacy Policy first'; | 345 | + String get loginAgreeToTermsToast => |
| 346 | + 'Please read and agree to the Terms of Service and Privacy Policy first'; | ||
| 322 | 347 | ||
| 323 | @override | 348 | @override |
| 324 | String get phoneLoginInvalidPhone => 'Invalid phone number'; | 349 | String get phoneLoginInvalidPhone => 'Invalid phone number'; |
| @@ -330,10 +355,12 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -330,10 +355,12 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 330 | String get phoneLoginInvalidCode => 'Invalid verification code'; | 355 | String get phoneLoginInvalidCode => 'Invalid verification code'; |
| 331 | 356 | ||
| 332 | @override | 357 | @override |
| 333 | - String get todayHealthDataAuthTitle => 'Unable to access heart rate health data'; | 358 | + String get todayHealthDataAuthTitle => |
| 359 | + 'Unable to access heart rate health data'; | ||
| 334 | 360 | ||
| 335 | @override | 361 | @override |
| 336 | - String get todayHealthDataAuthDescription => 'DoubleFeel needs permission to access your health data to provide stress reminders, real-time stress statistics, and health suggestions. Otherwise, some app features may not work properly. Your health data is stored locally only and will not be uploaded to any server.'; | 362 | + String get todayHealthDataAuthDescription => |
| 363 | + 'DoubleFeel needs permission to access your health data to provide stress reminders, real-time stress statistics, and health suggestions. Otherwise, some app features may not work properly. Your health data is stored locally only and will not be uploaded to any server.'; | ||
| 337 | 364 | ||
| 338 | @override | 365 | @override |
| 339 | String get todayHealthDataAuthAction => 'Authorize health data access'; | 366 | String get todayHealthDataAuthAction => 'Authorize health data access'; |
| @@ -354,19 +381,24 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -354,19 +381,24 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 354 | String get todayFaqLinkNoData => 'What if the app or watch face has no data?'; | 381 | String get todayFaqLinkNoData => 'What if the app or watch face has no data?'; |
| 355 | 382 | ||
| 356 | @override | 383 | @override |
| 357 | - String get todayFaqLinkHrvRealtimeUpdate => 'How can HRV data update in real time?'; | 384 | + String get todayFaqLinkHrvRealtimeUpdate => |
| 385 | + 'How can HRV data update in real time?'; | ||
| 358 | 386 | ||
| 359 | @override | 387 | @override |
| 360 | - String get todayFaqLinkWatchNoStatusNotification => 'Why can\'t my watch receive status notifications?'; | 388 | + String get todayFaqLinkWatchNoStatusNotification => |
| 389 | + 'Why can\'t my watch receive status notifications?'; | ||
| 361 | 390 | ||
| 362 | @override | 391 | @override |
| 363 | - String get todayFaqLinkWatchNoStatusAndInteractionNotification => 'Why can\'t my watch receive status and interaction notifications?'; | 392 | + String get todayFaqLinkWatchNoStatusAndInteractionNotification => |
| 393 | + 'Why can\'t my watch receive status and interaction notifications?'; | ||
| 364 | 394 | ||
| 365 | @override | 395 | @override |
| 366 | - String get todayFaqLinkWatchFaceDataDelay => 'Why is watch face data delayed or not updating?'; | 396 | + String get todayFaqLinkWatchFaceDataDelay => |
| 397 | + 'Why is watch face data delayed or not updating?'; | ||
| 367 | 398 | ||
| 368 | @override | 399 | @override |
| 369 | - String get todayFaqLinkWatchFaceBlackScreen => 'Why does the watch face turn black?'; | 400 | + String get todayFaqLinkWatchFaceBlackScreen => |
| 401 | + 'Why does the watch face turn black?'; | ||
| 370 | 402 | ||
| 371 | @override | 403 | @override |
| 372 | String get todayStressStatusTitle => 'Overall stress status'; | 404 | String get todayStressStatusTitle => 'Overall stress status'; |
| @@ -393,136 +425,176 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -393,136 +425,176 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 393 | String get todayStressStatusInsufficientData => 'Insufficient data'; | 425 | String get todayStressStatusInsufficientData => 'Insufficient data'; |
| 394 | 426 | ||
| 395 | @override | 427 | @override |
| 396 | - String get todayStressStatusOverloadDescription => 'Your current HRV is much lower than your long-term average, which may indicate fatigue, high stress, or insufficient recovery. Rest is recommended.'; | 428 | + String get todayStressStatusOverloadDescription => |
| 429 | + 'Your current HRV is much lower than your long-term average, which may indicate fatigue, high stress, or insufficient recovery. Rest is recommended.'; | ||
| 397 | 430 | ||
| 398 | @override | 431 | @override |
| 399 | - String get todayStressStatusCautionDescription => 'Your current HRV is below the normal range, and your body may be accumulating stress. Pay attention to rest and recovery.'; | 432 | + String get todayStressStatusCautionDescription => |
| 433 | + 'Your current HRV is below the normal range, and your body may be accumulating stress. Pay attention to rest and recovery.'; | ||
| 400 | 434 | ||
| 401 | @override | 435 | @override |
| 402 | - String get todayStressStatusNormalDescription => 'Your current body state is within your normal fluctuation range.'; | 436 | + String get todayStressStatusNormalDescription => |
| 437 | + 'Your current body state is within your normal fluctuation range.'; | ||
| 403 | 438 | ||
| 404 | @override | 439 | @override |
| 405 | - String get todayStressStatusExcellentDescription => 'Your current HRV is higher than your recent average, indicating better recovery and overall state.'; | 440 | + String get todayStressStatusExcellentDescription => |
| 441 | + 'Your current HRV is higher than your recent average, indicating better recovery and overall state.'; | ||
| 406 | 442 | ||
| 407 | @override | 443 | @override |
| 408 | - String get todayStressStatusInsufficientDataDescription => 'There is not enough available data to accurately assess your stress state yet.'; | 444 | + String get todayStressStatusInsufficientDataDescription => |
| 445 | + 'There is not enough available data to accurately assess your stress state yet.'; | ||
| 409 | 446 | ||
| 410 | @override | 447 | @override |
| 411 | - String get todayHrvMeasurementIntro => 'Apple Watch measures HRV every 2-5 hours by default. If you want to measure it manually right now, follow these steps:'; | 448 | + String get todayHrvMeasurementIntro => |
| 449 | + 'Apple Watch measures HRV every 2-5 hours by default. If you want to measure it manually right now, follow these steps:'; | ||
| 412 | 450 | ||
| 413 | @override | 451 | @override |
| 414 | - String get todayHrvMeasurementStep1 => '1. Wear your Apple Watch snugly, sit down, and stay calm'; | 452 | + String get todayHrvMeasurementStep1 => |
| 453 | + '1. Wear your Apple Watch snugly, sit down, and stay calm'; | ||
| 415 | 454 | ||
| 416 | @override | 455 | @override |
| 417 | - String get todayHrvMeasurementStep2 => '2. Open Mindfulness on Apple Watch and start Breathe'; | 456 | + String get todayHrvMeasurementStep2 => |
| 457 | + '2. Open Mindfulness on Apple Watch and start Breathe'; | ||
| 418 | 458 | ||
| 419 | @override | 459 | @override |
| 420 | - String get todayHrvMeasurementStep3 => '3. Keep breathing steadily and wait 1-3 minutes'; | 460 | + String get todayHrvMeasurementStep3 => |
| 461 | + '3. Keep breathing steadily and wait 1-3 minutes'; | ||
| 421 | 462 | ||
| 422 | @override | 463 | @override |
| 423 | - String get todayHrvMeasurementStep4 => '4. After breathing is complete, lock and unlock your iPhone once'; | 464 | + String get todayHrvMeasurementStep4 => |
| 465 | + '4. After breathing is complete, lock and unlock your iPhone once'; | ||
| 424 | 466 | ||
| 425 | @override | 467 | @override |
| 426 | - String get todayHrvMeasurementStep5 => '5. Wait about one minute. StressWatch will receive and display your data'; | 468 | + String get todayHrvMeasurementStep5 => |
| 469 | + '5. Wait about one minute. StressWatch will receive and display your data'; | ||
| 427 | 470 | ||
| 428 | @override | 471 | @override |
| 429 | - String get todayHrvMeasurementHint => 'Tip: Data comes from Apple Watch. After measurement, there may be delays or data may not sync immediately. If this happens, measure again and wait for the data to be read.'; | 472 | + String get todayHrvMeasurementHint => |
| 473 | + 'Tip: Data comes from Apple Watch. After measurement, there may be delays or data may not sync immediately. If this happens, measure again and wait for the data to be read.'; | ||
| 430 | 474 | ||
| 431 | @override | 475 | @override |
| 432 | - String get todayHrvMeasurementWarning => 'Note: Health permissions must be enabled, and Low Power Mode must be turned off.'; | 476 | + String get todayHrvMeasurementWarning => |
| 477 | + 'Note: Health permissions must be enabled, and Low Power Mode must be turned off.'; | ||
| 433 | 478 | ||
| 434 | @override | 479 | @override |
| 435 | String get todayStressStatusWhatTitle => 'What is overall stress status?'; | 480 | String get todayStressStatusWhatTitle => 'What is overall stress status?'; |
| 436 | 481 | ||
| 437 | @override | 482 | @override |
| 438 | - String get todayStressStatusWhatDescription1 => 'DoubleFeel combines your HRV (heart rate variability), resting heart rate, and body-state changes from the past 30 days to assess your overall stress level.'; | 483 | + String get todayStressStatusWhatDescription1 => |
| 484 | + 'DoubleFeel combines your HRV (heart rate variability), resting heart rate, and body-state changes from the past 30 days to assess your overall stress level.'; | ||
| 439 | 485 | ||
| 440 | @override | 486 | @override |
| 441 | - String get todayStressStatusWhatDescription2 => 'Because HRV fluctuates with emotions, exercise, sleep, and fatigue, a single reading has limited value. We recommend focusing on your overall stress status across the day, which is more stable and useful. It helps you understand your body state and helps close contacts notice changes in time.'; | 487 | + String get todayStressStatusWhatDescription2 => |
| 488 | + 'Because HRV fluctuates with emotions, exercise, sleep, and fatigue, a single reading has limited value. We recommend focusing on your overall stress status across the day, which is more stable and useful. It helps you understand your body state and helps close contacts notice changes in time.'; | ||
| 442 | 489 | ||
| 443 | @override | 490 | @override |
| 444 | - String get todayStressStatusWhyHrvTitle => 'Why use HRV (heart rate variability)?'; | 491 | + String get todayStressStatusWhyHrvTitle => |
| 492 | + 'Why use HRV (heart rate variability)?'; | ||
| 445 | 493 | ||
| 446 | @override | 494 | @override |
| 447 | - String get todayStressStatusWhyHrvDescription => 'HRV is an important metric for measuring body stress and recovery capacity.'; | 495 | + String get todayStressStatusWhyHrvDescription => |
| 496 | + 'HRV is an important metric for measuring body stress and recovery capacity.'; | ||
| 448 | 497 | ||
| 449 | @override | 498 | @override |
| 450 | String get todayStressStatusUsually => 'In general:'; | 499 | String get todayStressStatusUsually => 'In general:'; |
| 451 | 500 | ||
| 452 | @override | 501 | @override |
| 453 | - String get todayStressStatusHrvHigher => '· Higher HRV usually means better recovery'; | 502 | + String get todayStressStatusHrvHigher => |
| 503 | + '· Higher HRV usually means better recovery'; | ||
| 454 | 504 | ||
| 455 | @override | 505 | @override |
| 456 | - String get todayStressStatusHrvLower => '· Lower HRV may indicate fatigue, stress, or insufficient sleep'; | 506 | + String get todayStressStatusHrvLower => |
| 507 | + '· Lower HRV may indicate fatigue, stress, or insufficient sleep'; | ||
| 457 | 508 | ||
| 458 | @override | 509 | @override |
| 459 | - String get todayStressStatusHrvChangesFast => '· HRV changes quickly, making it useful for short-term body-state changes.'; | 510 | + String get todayStressStatusHrvChangesFast => |
| 511 | + '· HRV changes quickly, making it useful for short-term body-state changes.'; | ||
| 460 | 512 | ||
| 461 | @override | 513 | @override |
| 462 | - String get todayStressStatusAppWatchDifferenceTitle => 'How are stress statuses on the phone app and Apple Watch different?'; | 514 | + String get todayStressStatusAppWatchDifferenceTitle => |
| 515 | + 'How are stress statuses on the phone app and Apple Watch different?'; | ||
| 463 | 516 | ||
| 464 | @override | 517 | @override |
| 465 | - String get todayStressStatusAppWatchDifferenceApp => 'The phone app home page shows the day\'s overall stress status, combining HRV, resting heart rate, and overall trends.'; | 518 | + String get todayStressStatusAppWatchDifferenceApp => |
| 519 | + 'The phone app home page shows the day\'s overall stress status, combining HRV, resting heart rate, and overall trends.'; | ||
| 466 | 520 | ||
| 467 | @override | 521 | @override |
| 468 | - String get todayStressStatusAppWatchDifferenceWatch => 'Apple Watch shows the most recent real-time stress status, which is better for quickly checking your current body changes.'; | 522 | + String get todayStressStatusAppWatchDifferenceWatch => |
| 523 | + 'Apple Watch shows the most recent real-time stress status, which is better for quickly checking your current body changes.'; | ||
| 469 | 524 | ||
| 470 | @override | 525 | @override |
| 471 | - String get todayStressStatusWaitingDataTitle => 'Why does Waiting for data appear?'; | 526 | + String get todayStressStatusWaitingDataTitle => |
| 527 | + 'Why does Waiting for data appear?'; | ||
| 472 | 528 | ||
| 473 | @override | 529 | @override |
| 474 | - String get todayStressStatusWaitingDataDescription1 => 'Waiting for data means the current amount of collected data is not enough to generate a reliable stress assessment.'; | 530 | + String get todayStressStatusWaitingDataDescription1 => |
| 531 | + 'Waiting for data means the current amount of collected data is not enough to generate a reliable stress assessment.'; | ||
| 475 | 532 | ||
| 476 | @override | 533 | @override |
| 477 | - String get todayStressStatusWaitingDataDescription2 => 'Please keep wearing your Apple Watch and wait for the system to collect data automatically.'; | 534 | + String get todayStressStatusWaitingDataDescription2 => |
| 535 | + 'Please keep wearing your Apple Watch and wait for the system to collect data automatically.'; | ||
| 478 | 536 | ||
| 479 | @override | 537 | @override |
| 480 | - String get todayStressStatusWaitingDataReasonsIntro => 'Possible reasons include:'; | 538 | + String get todayStressStatusWaitingDataReasonsIntro => |
| 539 | + 'Possible reasons include:'; | ||
| 481 | 540 | ||
| 482 | @override | 541 | @override |
| 483 | String get todayStressStatusWaitingDataReason1 => '1. Not enough HRV samples'; | 542 | String get todayStressStatusWaitingDataReason1 => '1. Not enough HRV samples'; |
| 484 | 543 | ||
| 485 | @override | 544 | @override |
| 486 | - String get todayStressStatusWaitingDataReason2 => '2. Missing resting heart rate data'; | 545 | + String get todayStressStatusWaitingDataReason2 => |
| 546 | + '2. Missing resting heart rate data'; | ||
| 487 | 547 | ||
| 488 | @override | 548 | @override |
| 489 | - String get todayStressStatusWaitingDataReason3 => '3. Apple Watch has not been worn long enough'; | 549 | + String get todayStressStatusWaitingDataReason3 => |
| 550 | + '3. Apple Watch has not been worn long enough'; | ||
| 490 | 551 | ||
| 491 | @override | 552 | @override |
| 492 | - String get todayStressStatusWaitingDataReason4 => '4. Apple Health permissions are not enabled'; | 553 | + String get todayStressStatusWaitingDataReason4 => |
| 554 | + '4. Apple Health permissions are not enabled'; | ||
| 493 | 555 | ||
| 494 | @override | 556 | @override |
| 495 | - String get todayHrvPrincipleHowMeasureTitle => 'How does DoubleFeel measure stress status?'; | 557 | + String get todayHrvPrincipleHowMeasureTitle => |
| 558 | + 'How does DoubleFeel measure stress status?'; | ||
| 496 | 559 | ||
| 497 | @override | 560 | @override |
| 498 | - String get todayHrvPrincipleHowMeasureDescription1 => 'When you wear Apple Watch normally, the system automatically collects your heart rate data and syncs it to Apple Health.'; | 561 | + String get todayHrvPrincipleHowMeasureDescription1 => |
| 562 | + 'When you wear Apple Watch normally, the system automatically collects your heart rate data and syncs it to Apple Health.'; | ||
| 499 | 563 | ||
| 500 | @override | 564 | @override |
| 501 | - String get todayHrvPrincipleHowMeasureDescription2 => 'DoubleFeel calculates HRV (heart rate variability) indicators based on this data to assess your body stress and recovery state.'; | 565 | + String get todayHrvPrincipleHowMeasureDescription2 => |
| 566 | + 'DoubleFeel calculates HRV (heart rate variability) indicators based on this data to assess your body stress and recovery state.'; | ||
| 502 | 567 | ||
| 503 | @override | 568 | @override |
| 504 | - String get todayHrvPrincipleHowMeasureDescription3 => 'HRV is sensitive to stress, fatigue, sleep, emotions, and recovery, so it helps us notice body-state changes earlier.'; | 569 | + String get todayHrvPrincipleHowMeasureDescription3 => |
| 570 | + 'HRV is sensitive to stress, fatigue, sleep, emotions, and recovery, so it helps us notice body-state changes earlier.'; | ||
| 505 | 571 | ||
| 506 | @override | 572 | @override |
| 507 | - String get todayHrvPrincipleHowMeasureDescription4 => 'To make results more accurate, DoubleFeel compares your current HRV state with your own 30-day average instead of comparing it directly with other people.'; | 573 | + String get todayHrvPrincipleHowMeasureDescription4 => |
| 574 | + 'To make results more accurate, DoubleFeel compares your current HRV state with your own 30-day average instead of comparing it directly with other people.'; | ||
| 508 | 575 | ||
| 509 | @override | 576 | @override |
| 510 | String get todayRealtimeStressWhatTitle => 'What is real-time stress?'; | 577 | String get todayRealtimeStressWhatTitle => 'What is real-time stress?'; |
| 511 | 578 | ||
| 512 | @override | 579 | @override |
| 513 | - String get todayRealtimeStressWhatDescription1 => 'Real-time stress is a body stress indicator dynamically generated by DoubleFeel based on your current HRV, heart rate state, and changes in your personal history.'; | 580 | + String get todayRealtimeStressWhatDescription1 => |
| 581 | + 'Real-time stress is a body stress indicator dynamically generated by DoubleFeel based on your current HRV, heart rate state, and changes in your personal history.'; | ||
| 514 | 582 | ||
| 515 | @override | 583 | @override |
| 516 | - String get todayRealtimeStressWhatDescription2 => 'A higher stress value means your body state is deviating more from your usual baseline and may reflect fatigue, insufficient recovery, or high stress.'; | 584 | + String get todayRealtimeStressWhatDescription2 => |
| 585 | + 'A higher stress value means your body state is deviating more from your usual baseline and may reflect fatigue, insufficient recovery, or high stress.'; | ||
| 517 | 586 | ||
| 518 | @override | 587 | @override |
| 519 | - String get todayRealtimeStressWhatDescription3 => 'It helps you notice body changes faster and adjust rest, exercise, and daily rhythm in time.'; | 588 | + String get todayRealtimeStressWhatDescription3 => |
| 589 | + 'It helps you notice body changes faster and adjust rest, exercise, and daily rhythm in time.'; | ||
| 520 | 590 | ||
| 521 | @override | 591 | @override |
| 522 | - String get todayRealtimeStressDivisionTitle => 'How is real-time stress divided?'; | 592 | + String get todayRealtimeStressDivisionTitle => |
| 593 | + 'How is real-time stress divided?'; | ||
| 523 | 594 | ||
| 524 | @override | 595 | @override |
| 525 | - String get todayRealtimeStressDivisionIntro => 'Real-time stress is shown as a percentage:'; | 596 | + String get todayRealtimeStressDivisionIntro => |
| 597 | + 'Real-time stress is shown as a percentage:'; | ||
| 526 | 598 | ||
| 527 | @override | 599 | @override |
| 528 | String get todayRealtimeStressExcellentRange => 'Excellent: 1%-20%'; | 600 | String get todayRealtimeStressExcellentRange => 'Excellent: 1%-20%'; |
| @@ -537,79 +609,103 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -537,79 +609,103 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 537 | String get todayRealtimeStressOverloadRange => 'Stress overload: 81%-100%'; | 609 | String get todayRealtimeStressOverloadRange => 'Stress overload: 81%-100%'; |
| 538 | 610 | ||
| 539 | @override | 611 | @override |
| 540 | - String get todayRealtimeStressExcellentDescription => 'Your recovery state is good and you are generally relaxed.'; | 612 | + String get todayRealtimeStressExcellentDescription => |
| 613 | + 'Your recovery state is good and you are generally relaxed.'; | ||
| 541 | 614 | ||
| 542 | @override | 615 | @override |
| 543 | - String get todayRealtimeStressNormalDescription => 'Your body is within the normal fluctuation range.'; | 616 | + String get todayRealtimeStressNormalDescription => |
| 617 | + 'Your body is within the normal fluctuation range.'; | ||
| 544 | 618 | ||
| 545 | @override | 619 | @override |
| 546 | - String get todayRealtimeStressCautionDescription => 'Your body may be accumulating stress and needs proper rest and recovery.'; | 620 | + String get todayRealtimeStressCautionDescription => |
| 621 | + 'Your body may be accumulating stress and needs proper rest and recovery.'; | ||
| 547 | 622 | ||
| 548 | @override | 623 | @override |
| 549 | - String get todayRealtimeStressOverloadDescription => 'Your body stress is clearly high. Reduce load and pay attention to sleep and recovery.'; | 624 | + String get todayRealtimeStressOverloadDescription => |
| 625 | + 'Your body stress is clearly high. Reduce load and pay attention to sleep and recovery.'; | ||
| 550 | 626 | ||
| 551 | @override | 627 | @override |
| 552 | - String get todayRealtimeStressDivisionBaseline => 'These ranges are adjusted dynamically based on your personal baseline and should not be directly compared between users.'; | 628 | + String get todayRealtimeStressDivisionBaseline => |
| 629 | + 'These ranges are adjusted dynamically based on your personal baseline and should not be directly compared between users.'; | ||
| 553 | 630 | ||
| 554 | @override | 631 | @override |
| 555 | - String get todayRealtimeStressDivisionAwake => 'Real-time stress mainly reflects body stress changes while awake.'; | 632 | + String get todayRealtimeStressDivisionAwake => |
| 633 | + 'Real-time stress mainly reflects body stress changes while awake.'; | ||
| 556 | 634 | ||
| 557 | @override | 635 | @override |
| 558 | - String get todayRealtimeStressLowBetterTitle => 'Is lower real-time stress always better?'; | 636 | + String get todayRealtimeStressLowBetterTitle => |
| 637 | + 'Is lower real-time stress always better?'; | ||
| 559 | 638 | ||
| 560 | @override | 639 | @override |
| 561 | String get todayRealtimeStressLowBetterNo => 'Not necessarily.'; | 640 | String get todayRealtimeStressLowBetterNo => 'Not necessarily.'; |
| 562 | 641 | ||
| 563 | @override | 642 | @override |
| 564 | - String get todayRealtimeStressLowBetterType => 'Body stress can be normal or abnormal.'; | 643 | + String get todayRealtimeStressLowBetterType => |
| 644 | + 'Body stress can be normal or abnormal.'; | ||
| 565 | 645 | ||
| 566 | @override | 646 | @override |
| 567 | - String get todayRealtimeStressLowBetterExample => 'For example, real-time stress rising briefly during or after exercise is a normal recovery response. It can also rise temporarily during focused work or emotional excitement, which are normal body adjustments.'; | 647 | + String get todayRealtimeStressLowBetterExample => |
| 648 | + 'For example, real-time stress rising briefly during or after exercise is a normal recovery response. It can also rise temporarily during focused work or emotional excitement, which are normal body adjustments.'; | ||
| 568 | 649 | ||
| 569 | @override | 650 | @override |
| 570 | - String get todayRealtimeStressLowBetterHighStress => 'But if stress remains high while resting, sitting for a long time, or after poor sleep, it may indicate physical fatigue, mental stress, insufficient sleep recovery, incomplete exercise recovery, too much caffeine, alcohol, stimulants, or possible discomfort.'; | 651 | + String get todayRealtimeStressLowBetterHighStress => |
| 652 | + 'But if stress remains high while resting, sitting for a long time, or after poor sleep, it may indicate physical fatigue, mental stress, insufficient sleep recovery, incomplete exercise recovery, too much caffeine, alcohol, stimulants, or possible discomfort.'; | ||
| 571 | 653 | ||
| 572 | @override | 654 | @override |
| 573 | - String get todayRealtimeStressLowBetterTrend => 'DoubleFeel focuses more on your long-term trend than on a single fluctuation.'; | 655 | + String get todayRealtimeStressLowBetterTrend => |
| 656 | + 'DoubleFeel focuses more on your long-term trend than on a single fluctuation.'; | ||
| 574 | 657 | ||
| 575 | @override | 658 | @override |
| 576 | - String get todayRealtimeStressScenarioTitle => 'When should HRV and real-time stress be used?'; | 659 | + String get todayRealtimeStressScenarioTitle => |
| 660 | + 'When should HRV and real-time stress be used?'; | ||
| 577 | 661 | ||
| 578 | @override | 662 | @override |
| 579 | - String get todayRealtimeStressScenarioHrvDefault => 'With Apple Watch default settings, HRV updates every 2-5 hours.'; | 663 | + String get todayRealtimeStressScenarioHrvDefault => |
| 664 | + 'With Apple Watch default settings, HRV updates every 2-5 hours.'; | ||
| 580 | 665 | ||
| 581 | @override | 666 | @override |
| 582 | - String get todayRealtimeStressScenarioRegionLimit => 'In some regions, Apple Watch breathing features may be limited, which can affect HRV update frequency. Turning on breathing features may also consume more battery.'; | 667 | + String get todayRealtimeStressScenarioRegionLimit => |
| 668 | + 'In some regions, Apple Watch breathing features may be limited, which can affect HRV update frequency. Turning on breathing features may also consume more battery.'; | ||
| 583 | 669 | ||
| 584 | @override | 670 | @override |
| 585 | - String get todayRealtimeStressScenarioIntro => 'To address the long interval between HRV updates, DoubleFeel designed real-time stress:'; | 671 | + String get todayRealtimeStressScenarioIntro => |
| 672 | + 'To address the long interval between HRV updates, DoubleFeel designed real-time stress:'; | ||
| 586 | 673 | ||
| 587 | @override | 674 | @override |
| 588 | - String get todayRealtimeStressScenarioUpdateEvery6Min => '· Real-time stress updates every 6 minutes'; | 675 | + String get todayRealtimeStressScenarioUpdateEvery6Min => |
| 676 | + '· Real-time stress updates every 6 minutes'; | ||
| 589 | 677 | ||
| 590 | @override | 678 | @override |
| 591 | - String get todayRealtimeStressScenarioTimely => '· It can reflect body-state changes more promptly'; | 679 | + String get todayRealtimeStressScenarioTimely => |
| 680 | + '· It can reflect body-state changes more promptly'; | ||
| 592 | 681 | ||
| 593 | @override | 682 | @override |
| 594 | - String get todayRealtimeStressScenarioConsistentTrend => '· In most cases, the real-time stress trend is consistent with the HRV trend'; | 683 | + String get todayRealtimeStressScenarioConsistentTrend => |
| 684 | + '· In most cases, the real-time stress trend is consistent with the HRV trend'; | ||
| 595 | 685 | ||
| 596 | @override | 686 | @override |
| 597 | - String get todayRealtimeStressScenarioSummary => 'This lets users see long-term HRV trends while also using real-time stress as a short-term body-state reference.'; | 687 | + String get todayRealtimeStressScenarioSummary => |
| 688 | + 'This lets users see long-term HRV trends while also using real-time stress as a short-term body-state reference.'; | ||
| 598 | 689 | ||
| 599 | @override | 690 | @override |
| 600 | - String get todayFaqNoDataTitle => 'What if the app or watch face has no data?'; | 691 | + String get todayFaqNoDataTitle => |
| 692 | + 'What if the app or watch face has no data?'; | ||
| 601 | 693 | ||
| 602 | @override | 694 | @override |
| 603 | - String get todayFaqNoDataDescription1 => '1. Confirm that Apple Watch is on watchOS 10.0 or above and iPhone is on iOS 14 or above. You can check system versions in About.'; | 695 | + String get todayFaqNoDataDescription1 => |
| 696 | + '1. Confirm that Apple Watch is on watchOS 10.0 or above and iPhone is on iOS 14 or above. You can check system versions in About.'; | ||
| 604 | 697 | ||
| 605 | @override | 698 | @override |
| 606 | - String get todayFaqNoDataDescription2 => '2. Confirm all permissions are enabled: iPhone Health > Sharing > Apps > DoubleFeel > Turn On All Permissions.'; | 699 | + String get todayFaqNoDataDescription2 => |
| 700 | + '2. Confirm all permissions are enabled: iPhone Health > Sharing > Apps > DoubleFeel > Turn On All Permissions.'; | ||
| 607 | 701 | ||
| 608 | @override | 702 | @override |
| 609 | - String get todayFaqNoDataDescription3 => '3. Confirm the device is not in Low Power Mode, low battery, or worn too loosely, as these can affect data collection.'; | 703 | + String get todayFaqNoDataDescription3 => |
| 704 | + '3. Confirm the device is not in Low Power Mode, low battery, or worn too loosely, as these can affect data collection.'; | ||
| 610 | 705 | ||
| 611 | @override | 706 | @override |
| 612 | - String get todayFaqContactPrefix => 'If everything above is correct, you can '; | 707 | + String get todayFaqContactPrefix => |
| 708 | + 'If everything above is correct, you can '; | ||
| 613 | 709 | ||
| 614 | @override | 710 | @override |
| 615 | String get todayFaqContactAction => 'contact us'; | 711 | String get todayFaqContactAction => 'contact us'; |
| @@ -618,70 +714,90 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -618,70 +714,90 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 618 | String get todayFaqContactSuffix => '.'; | 714 | String get todayFaqContactSuffix => '.'; |
| 619 | 715 | ||
| 620 | @override | 716 | @override |
| 621 | - String get todayFaqWatchNoNotificationTitle => 'Watch cannot receive status notifications?'; | 717 | + String get todayFaqWatchNoNotificationTitle => |
| 718 | + 'Watch cannot receive status notifications?'; | ||
| 622 | 719 | ||
| 623 | @override | 720 | @override |
| 624 | - String get todayFaqWatchNoNotificationDescription1 => 'Apple Watch and iPhone notifications have priority rules: when your iPhone is unlocked and the screen is on, notifications only appear on the phone and will not appear on the watch.'; | 721 | + String get todayFaqWatchNoNotificationDescription1 => |
| 722 | + 'Apple Watch and iPhone notifications have priority rules: when your iPhone is unlocked and the screen is on, notifications only appear on the phone and will not appear on the watch.'; | ||
| 625 | 723 | ||
| 626 | @override | 724 | @override |
| 627 | - String get todayFaqWatchNoNotificationDescription2 => 'If stress data displays and updates normally but your watch does not receive notifications, try the following:'; | 725 | + String get todayFaqWatchNoNotificationDescription2 => |
| 726 | + 'If stress data displays and updates normally but your watch does not receive notifications, try the following:'; | ||
| 628 | 727 | ||
| 629 | @override | 728 | @override |
| 630 | - String get todayFaqWatchNoNotificationCheckPhoneNotification => '1. Check whether iPhone notifications are enabled (Settings > DoubleFeel > Notifications).'; | 729 | + String get todayFaqWatchNoNotificationCheckPhoneNotification => |
| 730 | + '1. Check whether iPhone notifications are enabled (Settings > DoubleFeel > Notifications).'; | ||
| 631 | 731 | ||
| 632 | @override | 732 | @override |
| 633 | - String get todayFaqWatchNoNotificationCheckPhoneBackgroundRefresh => '2. Check whether iPhone Background App Refresh is enabled (Settings > DoubleFeel > Background App Refresh).'; | 733 | + String get todayFaqWatchNoNotificationCheckPhoneBackgroundRefresh => |
| 734 | + '2. Check whether iPhone Background App Refresh is enabled (Settings > DoubleFeel > Background App Refresh).'; | ||
| 634 | 735 | ||
| 635 | @override | 736 | @override |
| 636 | - String get todayFaqWatchNoNotificationCheckWatchBackgroundRefresh => '3. Check whether Apple Watch Background App Refresh is enabled (Settings > General > Background App Refresh, and make sure DoubleFeel is enabled).'; | 737 | + String get todayFaqWatchNoNotificationCheckWatchBackgroundRefresh => |
| 738 | + '3. Check whether Apple Watch Background App Refresh is enabled (Settings > General > Background App Refresh, and make sure DoubleFeel is enabled).'; | ||
| 637 | 739 | ||
| 638 | @override | 740 | @override |
| 639 | - String get todayFaqWatchNoNotificationCheckModes => '4. Make sure Low Power, Focus, Do Not Disturb, Theater, Sleep, and similar modes are off.'; | 741 | + String get todayFaqWatchNoNotificationCheckModes => |
| 742 | + '4. Make sure Low Power, Focus, Do Not Disturb, Theater, Sleep, and similar modes are off.'; | ||
| 640 | 743 | ||
| 641 | @override | 744 | @override |
| 642 | - String get todayFaqWatchNoNotificationReinstall => '5. Reinstall DoubleFeel and restart Apple Watch and iPhone.'; | 745 | + String get todayFaqWatchNoNotificationReinstall => |
| 746 | + '5. Reinstall DoubleFeel and restart Apple Watch and iPhone.'; | ||
| 643 | 747 | ||
| 644 | @override | 748 | @override |
| 645 | - String get todayFaqWatchFaceDelayTitle => 'Watch face data not updating or delayed?'; | 749 | + String get todayFaqWatchFaceDelayTitle => |
| 750 | + 'Watch face data not updating or delayed?'; | ||
| 646 | 751 | ||
| 647 | @override | 752 | @override |
| 648 | - String get todayFaqWatchFaceDelayDescription1 => 'Due to Apple system limits, all watch faces, third-party or official, may have delays from a few minutes to half an hour. Developers cannot control the refresh frequency.'; | 753 | + String get todayFaqWatchFaceDelayDescription1 => |
| 754 | + 'Due to Apple system limits, all watch faces, third-party or official, may have delays from a few minutes to half an hour. Developers cannot control the refresh frequency.'; | ||
| 649 | 755 | ||
| 650 | @override | 756 | @override |
| 651 | - String get todayFaqWatchFaceDelayIfOverOneHour => 'If the phone data refreshes but the watch face still has not updated after more than 1 hour:'; | 757 | + String get todayFaqWatchFaceDelayIfOverOneHour => |
| 758 | + 'If the phone data refreshes but the watch face still has not updated after more than 1 hour:'; | ||
| 652 | 759 | ||
| 653 | @override | 760 | @override |
| 654 | - String get todayFaqWatchFaceDelayOpenWatchApp => 'Manually open DoubleFeel on Apple Watch and wait about 1 minute.'; | 761 | + String get todayFaqWatchFaceDelayOpenWatchApp => |
| 762 | + 'Manually open DoubleFeel on Apple Watch and wait about 1 minute.'; | ||
| 655 | 763 | ||
| 656 | @override | 764 | @override |
| 657 | String get todayFaqWatchFaceDelayIfStill => 'If it still does not update:'; | 765 | String get todayFaqWatchFaceDelayIfStill => 'If it still does not update:'; |
| 658 | 766 | ||
| 659 | @override | 767 | @override |
| 660 | - String get todayFaqWatchFaceDelayRestartApp => 'Close the DoubleFeel background process and restart it.'; | 768 | + String get todayFaqWatchFaceDelayRestartApp => |
| 769 | + 'Close the DoubleFeel background process and restart it.'; | ||
| 661 | 770 | ||
| 662 | @override | 771 | @override |
| 663 | - String get todayFaqWatchFaceDelayCheckIntro => 'If it still does not work, check:'; | 772 | + String get todayFaqWatchFaceDelayCheckIntro => |
| 773 | + 'If it still does not work, check:'; | ||
| 664 | 774 | ||
| 665 | @override | 775 | @override |
| 666 | - String get todayFaqWatchFaceDelayCheckData => '· Whether both phone and watch apps can show HRV data normally.'; | 776 | + String get todayFaqWatchFaceDelayCheckData => |
| 777 | + '· Whether both phone and watch apps can show HRV data normally.'; | ||
| 667 | 778 | ||
| 668 | @override | 779 | @override |
| 669 | - String get todayFaqWatchFaceDelayCheckPhoneHealth => '· Make sure all permissions are enabled on iPhone: iOS Settings > Privacy & Security > Health > DoubleFeel.'; | 780 | + String get todayFaqWatchFaceDelayCheckPhoneHealth => |
| 781 | + '· Make sure all permissions are enabled on iPhone: iOS Settings > Privacy & Security > Health > DoubleFeel.'; | ||
| 670 | 782 | ||
| 671 | @override | 783 | @override |
| 672 | - String get todayFaqWatchFaceDelayCheckWatchHealth => '· Make sure all permissions are enabled on Apple Watch: Settings > Health > Data Sources & Access > DoubleFeel.'; | 784 | + String get todayFaqWatchFaceDelayCheckWatchHealth => |
| 785 | + '· Make sure all permissions are enabled on Apple Watch: Settings > Health > Data Sources & Access > DoubleFeel.'; | ||
| 673 | 786 | ||
| 674 | @override | 787 | @override |
| 675 | - String get todayFaqWatchFaceDelayCheckBackgroundRefresh => '· Confirm DoubleFeel is enabled in Apple Watch > Settings > General > Background App Refresh.'; | 788 | + String get todayFaqWatchFaceDelayCheckBackgroundRefresh => |
| 789 | + '· Confirm DoubleFeel is enabled in Apple Watch > Settings > General > Background App Refresh.'; | ||
| 676 | 790 | ||
| 677 | @override | 791 | @override |
| 678 | - String get todayFaqWatchFaceDelayRestartWatch => '· If it still does not refresh automatically, restart Apple Watch. Long runtimes or high background usage may cause watch face updates to pause.'; | 792 | + String get todayFaqWatchFaceDelayRestartWatch => |
| 793 | + '· If it still does not refresh automatically, restart Apple Watch. Long runtimes or high background usage may cause watch face updates to pause.'; | ||
| 679 | 794 | ||
| 680 | @override | 795 | @override |
| 681 | String get todayFaqWatchFaceBlackScreenTitle => 'Watch face turns black?'; | 796 | String get todayFaqWatchFaceBlackScreenTitle => 'Watch face turns black?'; |
| 682 | 797 | ||
| 683 | @override | 798 | @override |
| 684 | - String get todayFaqWatchFaceBlackScreenDescription => 'If the custom interactive watch face turns black after being added and only shows time and date, long-press the watch face, tap Edit, swipe left to Complications, choose DoubleFeel, and add each component again as needed.'; | 799 | + String get todayFaqWatchFaceBlackScreenDescription => |
| 800 | + 'If the custom interactive watch face turns black after being added and only shows time and date, long-press the watch face, tap Edit, swipe left to Complications, choose DoubleFeel, and add each component again as needed.'; | ||
| 685 | 801 | ||
| 686 | @override | 802 | @override |
| 687 | String get today => 'Today'; | 803 | String get today => 'Today'; |
| @@ -699,16 +815,19 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -699,16 +815,19 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 699 | String get allPlans => 'All Plans'; | 815 | String get allPlans => 'All Plans'; |
| 700 | 816 | ||
| 701 | @override | 817 | @override |
| 702 | - String get clickToAddTheHrvThemedWatchFace => 'Click to add the HRV-themed watch face'; | 818 | + String get clickToAddTheHrvThemedWatchFace => |
| 819 | + 'Click to add the HRV-themed watch face'; | ||
| 703 | 820 | ||
| 704 | @override | 821 | @override |
| 705 | - String get stayOnTopOfYourHealthFluctuations => 'Stay on top of your health fluctuations'; | 822 | + String get stayOnTopOfYourHealthFluctuations => |
| 823 | + 'Stay on top of your health fluctuations'; | ||
| 706 | 824 | ||
| 707 | @override | 825 | @override |
| 708 | String get addACloseContact => 'Add a close contact'; | 826 | String get addACloseContact => 'Add a close contact'; |
| 709 | 827 | ||
| 710 | @override | 828 | @override |
| 711 | - String get oneMorePersonLookingOutForYourHealth => 'One more person looking out for your health'; | 829 | + String get oneMorePersonLookingOutForYourHealth => |
| 830 | + 'One more person looking out for your health'; | ||
| 712 | 831 | ||
| 713 | @override | 832 | @override |
| 714 | String get addAFriend => 'Add a friend'; | 833 | String get addAFriend => 'Add a friend'; |
| @@ -765,7 +884,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -765,7 +884,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 765 | String get questionsAndFeedback => 'Questions and Feedback'; | 884 | String get questionsAndFeedback => 'Questions and Feedback'; |
| 766 | 885 | ||
| 767 | @override | 886 | @override |
| 768 | - String get ifYouWouldLikeUsToReplyPleaseProvideYourEmailAddress => 'If you would like us to reply, please provide your email address'; | 887 | + String get ifYouWouldLikeUsToReplyPleaseProvideYourEmailAddress => |
| 888 | + 'If you would like us to reply, please provide your email address'; | ||
| 769 | 889 | ||
| 770 | @override | 890 | @override |
| 771 | String get uploadProof => 'Upload Proof'; | 891 | String get uploadProof => 'Upload Proof'; |
| @@ -774,7 +894,8 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -774,7 +894,8 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 774 | String get frequentlyAskedQuestions => 'Frequently Asked Questions'; | 894 | String get frequentlyAskedQuestions => 'Frequently Asked Questions'; |
| 775 | 895 | ||
| 776 | @override | 896 | @override |
| 777 | - String get areYouSureYouWantToDeleteYourAccount => 'Are you sure you want to delete your account?'; | 897 | + String get areYouSureYouWantToDeleteYourAccount => |
| 898 | + 'Are you sure you want to delete your account?'; | ||
| 778 | 899 | ||
| 779 | @override | 900 | @override |
| 780 | String get accountSettings => 'Account Settings'; | 901 | String get accountSettings => 'Account Settings'; |
| 1 | +// ignore: unused_import | ||
| 2 | +import 'package:intl/intl.dart' as intl; | ||
| 1 | import 'app_localizations.dart'; | 3 | import 'app_localizations.dart'; |
| 2 | 4 | ||
| 3 | // ignore_for_file: type=lint | 5 | // ignore_for_file: type=lint |
| @@ -70,7 +72,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -70,7 +72,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 70 | String get onboardingIntroTitle => 'DoubleFeel 是专为 Apple Watch 打造的健康陪伴app'; | 72 | String get onboardingIntroTitle => 'DoubleFeel 是专为 Apple Watch 打造的健康陪伴app'; |
| 71 | 73 | ||
| 72 | @override | 74 | @override |
| 73 | - String get onboardingIntroBody => '我们希望可以帮助你\n<em>关注自己的身心变化,也让爱你的人</em>及时发现你的<em>疲惫与需要</em>'; | 75 | + String get onboardingIntroBody => |
| 76 | + '我们希望可以帮助你\n<em>关注自己的身心变化,也让爱你的人</em>及时发现你的<em>疲惫与需要</em>'; | ||
| 74 | 77 | ||
| 75 | @override | 78 | @override |
| 76 | String get onboardingStateQuestion => '请问以下哪些描述,经常发生在你身上?'; | 79 | String get onboardingStateQuestion => '请问以下哪些描述,经常发生在你身上?'; |
| @@ -160,7 +163,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -160,7 +163,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 160 | String get onboardingHrvSubtitle => '它能帮助我们衡量整体的压力和健康状态'; | 163 | String get onboardingHrvSubtitle => '它能帮助我们衡量整体的压力和健康状态'; |
| 161 | 164 | ||
| 162 | @override | 165 | @override |
| 163 | - String get onboardingHrvDescription => '心率变异性(HRV, Heart Rate Variability)即心跳之间间隔时间的微小变化,反映了自主神经系统活动和身体对压力的反应能力'; | 166 | + String get onboardingHrvDescription => |
| 167 | + '心率变异性(HRV, Heart Rate Variability)即心跳之间间隔时间的微小变化,反映了自主神经系统活动和身体对压力的反应能力'; | ||
| 164 | 168 | ||
| 165 | @override | 169 | @override |
| 166 | String get onboardingTellMeMore => '展开说说'; | 170 | String get onboardingTellMeMore => '展开说说'; |
| @@ -184,10 +188,12 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -184,10 +188,12 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 184 | String get onboardingHealthPermissionTitle => '允许访问健康数据'; | 188 | String get onboardingHealthPermissionTitle => '允许访问健康数据'; |
| 185 | 189 | ||
| 186 | @override | 190 | @override |
| 187 | - String get onboardingHealthPermissionBody => 'DoubleFeel需要连接健康穿戴设备数据,以提醒、统计压力时刻、提供建议。'; | 191 | + String get onboardingHealthPermissionBody => |
| 192 | + 'DoubleFeel需要连接健康穿戴设备数据,以提醒、统计压力时刻、提供建议。'; | ||
| 188 | 193 | ||
| 189 | @override | 194 | @override |
| 190 | - String get onboardingHealthPermissionPrivacy => '请放心,你的健康数据只会存储在本地,我们不上传任何相关数据。'; | 195 | + String get onboardingHealthPermissionPrivacy => |
| 196 | + '请放心,你的健康数据只会存储在本地,我们不上传任何相关数据。'; | ||
| 191 | 197 | ||
| 192 | @override | 198 | @override |
| 193 | String get onboardingNotificationTitle => '开启通知'; | 199 | String get onboardingNotificationTitle => '开启通知'; |
| @@ -196,7 +202,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -196,7 +202,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 196 | String get onboardingNotificationSubtitle => '及时了解身体每一次异动'; | 202 | String get onboardingNotificationSubtitle => '及时了解身体每一次异动'; |
| 197 | 203 | ||
| 198 | @override | 204 | @override |
| 199 | - String get onboardingNotificationBody => 'AppleWatch数据更新后会及时提醒你,帮助你及时行动,改善压力状态'; | 205 | + String get onboardingNotificationBody => |
| 206 | + 'AppleWatch数据更新后会及时提醒你,帮助你及时行动,改善压力状态'; | ||
| 200 | 207 | ||
| 201 | @override | 208 | @override |
| 202 | String get onboardingMemberTitle => '获得年度会员优惠'; | 209 | String get onboardingMemberTitle => '获得年度会员优惠'; |
| @@ -220,7 +227,9 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -220,7 +227,9 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 220 | String get healthCompanionIsNowAvailable => '健康陪伴已开启'; | 227 | String get healthCompanionIsNowAvailable => '健康陪伴已开启'; |
| 221 | 228 | ||
| 222 | @override | 229 | @override |
| 223 | - String get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => '你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'; | 230 | + String |
| 231 | + get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired => | ||
| 232 | + '你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'; | ||
| 224 | 233 | ||
| 225 | @override | 234 | @override |
| 226 | String get bindPartnerTitle => '添加亲密联系人\n多一个人关注你的健康'; | 235 | String get bindPartnerTitle => '添加亲密联系人\n多一个人关注你的健康'; |
| @@ -333,7 +342,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -333,7 +342,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 333 | String get todayHealthDataAuthTitle => '无法获取心率健康数据'; | 342 | String get todayHealthDataAuthTitle => '无法获取心率健康数据'; |
| 334 | 343 | ||
| 335 | @override | 344 | @override |
| 336 | - String get todayHealthDataAuthDescription => 'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'; | 345 | + String get todayHealthDataAuthDescription => |
| 346 | + 'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'; | ||
| 337 | 347 | ||
| 338 | @override | 348 | @override |
| 339 | String get todayHealthDataAuthAction => '授权访问健康数据'; | 349 | String get todayHealthDataAuthAction => '授权访问健康数据'; |
| @@ -360,7 +370,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -360,7 +370,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 360 | String get todayFaqLinkWatchNoStatusNotification => '手表为什么无法收到状态通知?'; | 370 | String get todayFaqLinkWatchNoStatusNotification => '手表为什么无法收到状态通知?'; |
| 361 | 371 | ||
| 362 | @override | 372 | @override |
| 363 | - String get todayFaqLinkWatchNoStatusAndInteractionNotification => '手表为什么无法收到状态和互动通知?'; | 373 | + String get todayFaqLinkWatchNoStatusAndInteractionNotification => |
| 374 | + '手表为什么无法收到状态和互动通知?'; | ||
| 364 | 375 | ||
| 365 | @override | 376 | @override |
| 366 | String get todayFaqLinkWatchFaceDataDelay => '手表表盘数据不更新或者有延迟?'; | 377 | String get todayFaqLinkWatchFaceDataDelay => '手表表盘数据不更新或者有延迟?'; |
| @@ -393,22 +404,27 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -393,22 +404,27 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 393 | String get todayStressStatusInsufficientData => '数据不足'; | 404 | String get todayStressStatusInsufficientData => '数据不足'; |
| 394 | 405 | ||
| 395 | @override | 406 | @override |
| 396 | - String get todayStressStatusOverloadDescription => '当前 HRV 明显低于你的长期平均水平,可能意味着身体疲劳、压力过高或恢复不足。建议及时休息。'; | 407 | + String get todayStressStatusOverloadDescription => |
| 408 | + '当前 HRV 明显低于你的长期平均水平,可能意味着身体疲劳、压力过高或恢复不足。建议及时休息。'; | ||
| 397 | 409 | ||
| 398 | @override | 410 | @override |
| 399 | - String get todayStressStatusCautionDescription => '当前 HRV 低于正常范围,身体可能正在积累压力,需要注意作息与恢复。'; | 411 | + String get todayStressStatusCautionDescription => |
| 412 | + '当前 HRV 低于正常范围,身体可能正在积累压力,需要注意作息与恢复。'; | ||
| 400 | 413 | ||
| 401 | @override | 414 | @override |
| 402 | String get todayStressStatusNormalDescription => '当前身体状态处于你的正常波动范围内。'; | 415 | String get todayStressStatusNormalDescription => '当前身体状态处于你的正常波动范围内。'; |
| 403 | 416 | ||
| 404 | @override | 417 | @override |
| 405 | - String get todayStressStatusExcellentDescription => '当前 HRV 高于近期平均水平,代表身体恢复与整体状态较好。'; | 418 | + String get todayStressStatusExcellentDescription => |
| 419 | + '当前 HRV 高于近期平均水平,代表身体恢复与整体状态较好。'; | ||
| 406 | 420 | ||
| 407 | @override | 421 | @override |
| 408 | - String get todayStressStatusInsufficientDataDescription => '当前可用数据不足,暂时无法准确判断压力状态。'; | 422 | + String get todayStressStatusInsufficientDataDescription => |
| 423 | + '当前可用数据不足,暂时无法准确判断压力状态。'; | ||
| 409 | 424 | ||
| 410 | @override | 425 | @override |
| 411 | - String get todayHrvMeasurementIntro => 'AppleWatch默认每2-5小时测量一次HRV,如果你希望立即手动进行测量,可以参考以下方法:'; | 426 | + String get todayHrvMeasurementIntro => |
| 427 | + 'AppleWatch默认每2-5小时测量一次HRV,如果你希望立即手动进行测量,可以参考以下方法:'; | ||
| 412 | 428 | ||
| 413 | @override | 429 | @override |
| 414 | String get todayHrvMeasurementStep1 => '1、戴紧AppleWatch,坐下来,保持心境平和'; | 430 | String get todayHrvMeasurementStep1 => '1、戴紧AppleWatch,坐下来,保持心境平和'; |
| @@ -426,7 +442,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -426,7 +442,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 426 | String get todayHrvMeasurementStep5 => '5、等待一分钟左右,StressWatch会收到你的数据并展示'; | 442 | String get todayHrvMeasurementStep5 => '5、等待一分钟左右,StressWatch会收到你的数据并展示'; |
| 427 | 443 | ||
| 428 | @override | 444 | @override |
| 429 | - String get todayHrvMeasurementHint => '提示:数据源来自AppleWatch,在测量之后可能存在延迟或是数据未能同步的情况。如若出现上述情况,请重新测量并等待数据读取。'; | 445 | + String get todayHrvMeasurementHint => |
| 446 | + '提示:数据源来自AppleWatch,在测量之后可能存在延迟或是数据未能同步的情况。如若出现上述情况,请重新测量并等待数据读取。'; | ||
| 430 | 447 | ||
| 431 | @override | 448 | @override |
| 432 | String get todayHrvMeasurementWarning => '注意:需打开健康里的权限,同时关闭省电模式。'; | 449 | String get todayHrvMeasurementWarning => '注意:需打开健康里的权限,同时关闭省电模式。'; |
| @@ -435,10 +452,12 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -435,10 +452,12 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 435 | String get todayStressStatusWhatTitle => '什么是综合压力状态?'; | 452 | String get todayStressStatusWhatTitle => '什么是综合压力状态?'; |
| 436 | 453 | ||
| 437 | @override | 454 | @override |
| 438 | - String get todayStressStatusWhatDescription1 => 'DoubleFeel 会结合你过去 30 天的 HRV(心率变异性)、静息心率以及当天的身体状态变化,综合评估你的整体压力水平。'; | 455 | + String get todayStressStatusWhatDescription1 => |
| 456 | + 'DoubleFeel 会结合你过去 30 天的 HRV(心率变异性)、静息心率以及当天的身体状态变化,综合评估你的整体压力水平。'; | ||
| 439 | 457 | ||
| 440 | @override | 458 | @override |
| 441 | - String get todayStressStatusWhatDescription2 => '由于 HRV 会随着情绪、运动、睡眠和疲劳不断波动,单次数据参考意义有限,因此我们更建议关注一整天的综合压力状态,让结果更稳定、更有参考价值。综合压力不仅能帮助你了解自己的身体状态,也能让亲密联系人更及时地关注你的变化。'; | 459 | + String get todayStressStatusWhatDescription2 => |
| 460 | + '由于 HRV 会随着情绪、运动、睡眠和疲劳不断波动,单次数据参考意义有限,因此我们更建议关注一整天的综合压力状态,让结果更稳定、更有参考价值。综合压力不仅能帮助你了解自己的身体状态,也能让亲密联系人更及时地关注你的变化。'; | ||
| 442 | 461 | ||
| 443 | @override | 462 | @override |
| 444 | String get todayStressStatusWhyHrvTitle => '为什么要参考 HRV(心率变异性)?'; | 463 | String get todayStressStatusWhyHrvTitle => '为什么要参考 HRV(心率变异性)?'; |
| @@ -459,22 +478,27 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -459,22 +478,27 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 459 | String get todayStressStatusHrvChangesFast => '· HRV 变化较快,更适合观察短时间内的身体状态变化。'; | 478 | String get todayStressStatusHrvChangesFast => '· HRV 变化较快,更适合观察短时间内的身体状态变化。'; |
| 460 | 479 | ||
| 461 | @override | 480 | @override |
| 462 | - String get todayStressStatusAppWatchDifferenceTitle => '手机 App 与 Apple Watch 显示的压力状态有什么区别?'; | 481 | + String get todayStressStatusAppWatchDifferenceTitle => |
| 482 | + '手机 App 与 Apple Watch 显示的压力状态有什么区别?'; | ||
| 463 | 483 | ||
| 464 | @override | 484 | @override |
| 465 | - String get todayStressStatusAppWatchDifferenceApp => '手机 App 首页显示的是当天的综合压力状态,会综合分析 HRV、静息心率与整体趋势。'; | 485 | + String get todayStressStatusAppWatchDifferenceApp => |
| 486 | + '手机 App 首页显示的是当天的综合压力状态,会综合分析 HRV、静息心率与整体趋势。'; | ||
| 466 | 487 | ||
| 467 | @override | 488 | @override |
| 468 | - String get todayStressStatusAppWatchDifferenceWatch => 'Apple Watch 显示的是最近一次的实时压力状态,更适合快速查看当前身体变化。'; | 489 | + String get todayStressStatusAppWatchDifferenceWatch => |
| 490 | + 'Apple Watch 显示的是最近一次的实时压力状态,更适合快速查看当前身体变化。'; | ||
| 469 | 491 | ||
| 470 | @override | 492 | @override |
| 471 | String get todayStressStatusWaitingDataTitle => '为什么会出现“等待数据”?'; | 493 | String get todayStressStatusWaitingDataTitle => '为什么会出现“等待数据”?'; |
| 472 | 494 | ||
| 473 | @override | 495 | @override |
| 474 | - String get todayStressStatusWaitingDataDescription1 => '“等待数据”代表当前采集到的数据量不足,暂时无法生成可靠的压力评估。'; | 496 | + String get todayStressStatusWaitingDataDescription1 => |
| 497 | + '“等待数据”代表当前采集到的数据量不足,暂时无法生成可靠的压力评估。'; | ||
| 475 | 498 | ||
| 476 | @override | 499 | @override |
| 477 | - String get todayStressStatusWaitingDataDescription2 => '请继续佩戴 Apple Watch,等待系统自动采集数据。'; | 500 | + String get todayStressStatusWaitingDataDescription2 => |
| 501 | + '请继续佩戴 Apple Watch,等待系统自动采集数据。'; | ||
| 478 | 502 | ||
| 479 | @override | 503 | @override |
| 480 | String get todayStressStatusWaitingDataReasonsIntro => '可能原因包括:'; | 504 | String get todayStressStatusWaitingDataReasonsIntro => '可能原因包括:'; |
| @@ -495,28 +519,35 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -495,28 +519,35 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 495 | String get todayHrvPrincipleHowMeasureTitle => 'DoubleFeel 如何测量压力状态?'; | 519 | String get todayHrvPrincipleHowMeasureTitle => 'DoubleFeel 如何测量压力状态?'; |
| 496 | 520 | ||
| 497 | @override | 521 | @override |
| 498 | - String get todayHrvPrincipleHowMeasureDescription1 => '当你正常佩戴 Apple Watch 时,系统会自动采集你的心率数据,并同步至 Apple Health。'; | 522 | + String get todayHrvPrincipleHowMeasureDescription1 => |
| 523 | + '当你正常佩戴 Apple Watch 时,系统会自动采集你的心率数据,并同步至 Apple Health。'; | ||
| 499 | 524 | ||
| 500 | @override | 525 | @override |
| 501 | - String get todayHrvPrincipleHowMeasureDescription2 => 'DoubleFeel 会基于这些数据计算 HRV(心率变异性)相关指标,用于评估你的身体压力与恢复状态。'; | 526 | + String get todayHrvPrincipleHowMeasureDescription2 => |
| 527 | + 'DoubleFeel 会基于这些数据计算 HRV(心率变异性)相关指标,用于评估你的身体压力与恢复状态。'; | ||
| 502 | 528 | ||
| 503 | @override | 529 | @override |
| 504 | - String get todayHrvPrincipleHowMeasureDescription3 => 'HRV 对压力、疲劳、睡眠、情绪与身体恢复都非常敏感,因此它能够帮助我们更早发现身体状态变化。'; | 530 | + String get todayHrvPrincipleHowMeasureDescription3 => |
| 531 | + 'HRV 对压力、疲劳、睡眠、情绪与身体恢复都非常敏感,因此它能够帮助我们更早发现身体状态变化。'; | ||
| 505 | 532 | ||
| 506 | @override | 533 | @override |
| 507 | - String get todayHrvPrincipleHowMeasureDescription4 => '为了让结果更准确,DoubleFeel 会将你当前的 HRV 状态与过去 30 天的个人平均水平进行对比,而不是直接与其他人比较。'; | 534 | + String get todayHrvPrincipleHowMeasureDescription4 => |
| 535 | + '为了让结果更准确,DoubleFeel 会将你当前的 HRV 状态与过去 30 天的个人平均水平进行对比,而不是直接与其他人比较。'; | ||
| 508 | 536 | ||
| 509 | @override | 537 | @override |
| 510 | String get todayRealtimeStressWhatTitle => '什么是实时压力?'; | 538 | String get todayRealtimeStressWhatTitle => '什么是实时压力?'; |
| 511 | 539 | ||
| 512 | @override | 540 | @override |
| 513 | - String get todayRealtimeStressWhatDescription1 => '实时压力是 DoubleFeel 根据你当前的 HRV、心率状态与个人历史数据变化,动态生成的身体压力指标。'; | 541 | + String get todayRealtimeStressWhatDescription1 => |
| 542 | + '实时压力是 DoubleFeel 根据你当前的 HRV、心率状态与个人历史数据变化,动态生成的身体压力指标。'; | ||
| 514 | 543 | ||
| 515 | @override | 544 | @override |
| 516 | - String get todayRealtimeStressWhatDescription2 => '压力值越高,代表你的身体状态相比平时偏离越明显,可能正处于疲劳、恢复不足或高压力状态。'; | 545 | + String get todayRealtimeStressWhatDescription2 => |
| 546 | + '压力值越高,代表你的身体状态相比平时偏离越明显,可能正处于疲劳、恢复不足或高压力状态。'; | ||
| 517 | 547 | ||
| 518 | @override | 548 | @override |
| 519 | - String get todayRealtimeStressWhatDescription3 => '它能够帮助你更快发现身体变化,并及时调整休息、运动与生活节奏。'; | 549 | + String get todayRealtimeStressWhatDescription3 => |
| 550 | + '它能够帮助你更快发现身体变化,并及时调整休息、运动与生活节奏。'; | ||
| 520 | 551 | ||
| 521 | @override | 552 | @override |
| 522 | String get todayRealtimeStressDivisionTitle => '实时压力如何划分?'; | 553 | String get todayRealtimeStressDivisionTitle => '实时压力如何划分?'; |
| @@ -546,10 +577,12 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -546,10 +577,12 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 546 | String get todayRealtimeStressCautionDescription => '身体可能正在积累压力,需要适当休息与恢复。'; | 577 | String get todayRealtimeStressCautionDescription => '身体可能正在积累压力,需要适当休息与恢复。'; |
| 547 | 578 | ||
| 548 | @override | 579 | @override |
| 549 | - String get todayRealtimeStressOverloadDescription => '身体压力明显偏高,建议减少负荷、注意睡眠与恢复。'; | 580 | + String get todayRealtimeStressOverloadDescription => |
| 581 | + '身体压力明显偏高,建议减少负荷、注意睡眠与恢复。'; | ||
| 550 | 582 | ||
| 551 | @override | 583 | @override |
| 552 | - String get todayRealtimeStressDivisionBaseline => '以上区间会结合你的个人基线动态调整,不同用户之间并不直接比较。'; | 584 | + String get todayRealtimeStressDivisionBaseline => |
| 585 | + '以上区间会结合你的个人基线动态调整,不同用户之间并不直接比较。'; | ||
| 553 | 586 | ||
| 554 | @override | 587 | @override |
| 555 | String get todayRealtimeStressDivisionAwake => '此外,实时压力主要反映清醒状态下的身体压力变化。'; | 588 | String get todayRealtimeStressDivisionAwake => '此外,实时压力主要反映清醒状态下的身体压力变化。'; |
| @@ -564,25 +597,31 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -564,25 +597,31 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 564 | String get todayRealtimeStressLowBetterType => '身体压力分为“正常压力”与“异常压力”。'; | 597 | String get todayRealtimeStressLowBetterType => '身体压力分为“正常压力”与“异常压力”。'; |
| 565 | 598 | ||
| 566 | @override | 599 | @override |
| 567 | - String get todayRealtimeStressLowBetterExample => '例如:运动期间或运动后,实时压力短时间升高属于正常恢复反应;工作专注、情绪兴奋时,压力也可能暂时升高,这些都属于正常的身体调节。'; | 600 | + String get todayRealtimeStressLowBetterExample => |
| 601 | + '例如:运动期间或运动后,实时压力短时间升高属于正常恢复反应;工作专注、情绪兴奋时,压力也可能暂时升高,这些都属于正常的身体调节。'; | ||
| 568 | 602 | ||
| 569 | @override | 603 | @override |
| 570 | - String get todayRealtimeStressLowBetterHighStress => '但如果在静息、久坐或睡眠不足的情况下,压力长期偏高,则可能意味着身体疲劳、心理压力较大、睡眠恢复不足、运动恢复不充分、摄入过多咖啡因、酒精或刺激物、身体可能处于不适状态。'; | 604 | + String get todayRealtimeStressLowBetterHighStress => |
| 605 | + '但如果在静息、久坐或睡眠不足的情况下,压力长期偏高,则可能意味着身体疲劳、心理压力较大、睡眠恢复不足、运动恢复不充分、摄入过多咖啡因、酒精或刺激物、身体可能处于不适状态。'; | ||
| 571 | 606 | ||
| 572 | @override | 607 | @override |
| 573 | - String get todayRealtimeStressLowBetterTrend => 'DoubleFeel 更关注的是你的长期变化趋势,而不是单次波动。'; | 608 | + String get todayRealtimeStressLowBetterTrend => |
| 609 | + 'DoubleFeel 更关注的是你的长期变化趋势,而不是单次波动。'; | ||
| 574 | 610 | ||
| 575 | @override | 611 | @override |
| 576 | String get todayRealtimeStressScenarioTitle => 'HRV 与实时压力适用场景?'; | 612 | String get todayRealtimeStressScenarioTitle => 'HRV 与实时压力适用场景?'; |
| 577 | 613 | ||
| 578 | @override | 614 | @override |
| 579 | - String get todayRealtimeStressScenarioHrvDefault => '在 Apple Watch 的默认设置下,HRV 每 2~5 小时更新一次。'; | 615 | + String get todayRealtimeStressScenarioHrvDefault => |
| 616 | + '在 Apple Watch 的默认设置下,HRV 每 2~5 小时更新一次。'; | ||
| 580 | 617 | ||
| 581 | @override | 618 | @override |
| 582 | - String get todayRealtimeStressScenarioRegionLimit => '在部分地区,由于 Apple Watch 的呼吸功能受限,HRV 的更新频率可能会受到影响,并且开启呼吸功能后也会消耗更多电量。'; | 619 | + String get todayRealtimeStressScenarioRegionLimit => |
| 620 | + '在部分地区,由于 Apple Watch 的呼吸功能受限,HRV 的更新频率可能会受到影响,并且开启呼吸功能后也会消耗更多电量。'; | ||
| 583 | 621 | ||
| 584 | @override | 622 | @override |
| 585 | - String get todayRealtimeStressScenarioIntro => '为了解决 HRV 更新间隔较长的问题,DoubleFeel 设计了实时压力功能:'; | 623 | + String get todayRealtimeStressScenarioIntro => |
| 624 | + '为了解决 HRV 更新间隔较长的问题,DoubleFeel 设计了实时压力功能:'; | ||
| 586 | 625 | ||
| 587 | @override | 626 | @override |
| 588 | String get todayRealtimeStressScenarioUpdateEvery6Min => '· 实时压力每 6 分钟更新一次'; | 627 | String get todayRealtimeStressScenarioUpdateEvery6Min => '· 实时压力每 6 分钟更新一次'; |
| @@ -591,22 +630,27 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -591,22 +630,27 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 591 | String get todayRealtimeStressScenarioTimely => '· 可以更及时地反映身体状态变化'; | 630 | String get todayRealtimeStressScenarioTimely => '· 可以更及时地反映身体状态变化'; |
| 592 | 631 | ||
| 593 | @override | 632 | @override |
| 594 | - String get todayRealtimeStressScenarioConsistentTrend => '· 在大多数情况下,实时压力趋势与 HRV 趋势是一致的'; | 633 | + String get todayRealtimeStressScenarioConsistentTrend => |
| 634 | + '· 在大多数情况下,实时压力趋势与 HRV 趋势是一致的'; | ||
| 595 | 635 | ||
| 596 | @override | 636 | @override |
| 597 | - String get todayRealtimeStressScenarioSummary => '这样用户既能获得 HRV 的长期趋势,也能通过实时压力获得短时身体状态的参考。'; | 637 | + String get todayRealtimeStressScenarioSummary => |
| 638 | + '这样用户既能获得 HRV 的长期趋势,也能通过实时压力获得短时身体状态的参考。'; | ||
| 598 | 639 | ||
| 599 | @override | 640 | @override |
| 600 | String get todayFaqNoDataTitle => 'APP或表盘有没有数据怎么办?'; | 641 | String get todayFaqNoDataTitle => 'APP或表盘有没有数据怎么办?'; |
| 601 | 642 | ||
| 602 | @override | 643 | @override |
| 603 | - String get todayFaqNoDataDescription1 => '1. 确认苹果手表系统在10.0以上,手机系统在14以上,系统版本可在「关于本机」内查看。'; | 644 | + String get todayFaqNoDataDescription1 => |
| 645 | + '1. 确认苹果手表系统在10.0以上,手机系统在14以上,系统版本可在「关于本机」内查看。'; | ||
| 604 | 646 | ||
| 605 | @override | 647 | @override |
| 606 | - String get todayFaqNoDataDescription2 => '2. 确认是否开启所有权限:手机「健康」-「共享」-「app」-「DoubleFeel」-「打开所有权限」。'; | 648 | + String get todayFaqNoDataDescription2 => |
| 649 | + '2. 确认是否开启所有权限:手机「健康」-「共享」-「app」-「DoubleFeel」-「打开所有权限」。'; | ||
| 607 | 650 | ||
| 608 | @override | 651 | @override |
| 609 | - String get todayFaqNoDataDescription3 => '3. 确认设备是否处于省电模式、低电量状态或手表佩戴未贴紧,以上情况会影响手表数据采集。'; | 652 | + String get todayFaqNoDataDescription3 => |
| 653 | + '3. 确认设备是否处于省电模式、低电量状态或手表佩戴未贴紧,以上情况会影响手表数据采集。'; | ||
| 610 | 654 | ||
| 611 | @override | 655 | @override |
| 612 | String get todayFaqContactPrefix => '如以上均检查无问题,可以'; | 656 | String get todayFaqContactPrefix => '如以上均检查无问题,可以'; |
| @@ -621,37 +665,46 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -621,37 +665,46 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 621 | String get todayFaqWatchNoNotificationTitle => '手表无法收到状态通知?'; | 665 | String get todayFaqWatchNoNotificationTitle => '手表无法收到状态通知?'; |
| 622 | 666 | ||
| 623 | @override | 667 | @override |
| 624 | - String get todayFaqWatchNoNotificationDescription1 => '苹果手表和手机的通知展示有优先级:当手机已解锁并亮屏时,通知只会在手机端展示,不会在手表上出现。'; | 668 | + String get todayFaqWatchNoNotificationDescription1 => |
| 669 | + '苹果手表和手机的通知展示有优先级:当手机已解锁并亮屏时,通知只会在手机端展示,不会在手表上出现。'; | ||
| 625 | 670 | ||
| 626 | @override | 671 | @override |
| 627 | - String get todayFaqWatchNoNotificationDescription2 => '若压力数据可正常显示和自动更新,但手表未收到通知,可尝试以下操作:'; | 672 | + String get todayFaqWatchNoNotificationDescription2 => |
| 673 | + '若压力数据可正常显示和自动更新,但手表未收到通知,可尝试以下操作:'; | ||
| 628 | 674 | ||
| 629 | @override | 675 | @override |
| 630 | - String get todayFaqWatchNoNotificationCheckPhoneNotification => '1. 检查手机是否打开通知(设置-DoubleFeel-通知)。'; | 676 | + String get todayFaqWatchNoNotificationCheckPhoneNotification => |
| 677 | + '1. 检查手机是否打开通知(设置-DoubleFeel-通知)。'; | ||
| 631 | 678 | ||
| 632 | @override | 679 | @override |
| 633 | - String get todayFaqWatchNoNotificationCheckPhoneBackgroundRefresh => '2. 检查手机是否打开后台App刷新(设置-DoubleFeel-后台App刷新)。'; | 680 | + String get todayFaqWatchNoNotificationCheckPhoneBackgroundRefresh => |
| 681 | + '2. 检查手机是否打开后台App刷新(设置-DoubleFeel-后台App刷新)。'; | ||
| 634 | 682 | ||
| 635 | @override | 683 | @override |
| 636 | - String get todayFaqWatchNoNotificationCheckWatchBackgroundRefresh => '3. 检查手表是否打开后台App刷新(设置-通用-后台App刷新,并确保DoubleFeel开启)。'; | 684 | + String get todayFaqWatchNoNotificationCheckWatchBackgroundRefresh => |
| 685 | + '3. 检查手表是否打开后台App刷新(设置-通用-后台App刷新,并确保DoubleFeel开启)。'; | ||
| 637 | 686 | ||
| 638 | @override | 687 | @override |
| 639 | - String get todayFaqWatchNoNotificationCheckModes => '4. 确保未处于低电量/专注/勿扰/剧院/睡眠等模式。'; | 688 | + String get todayFaqWatchNoNotificationCheckModes => |
| 689 | + '4. 确保未处于低电量/专注/勿扰/剧院/睡眠等模式。'; | ||
| 640 | 690 | ||
| 641 | @override | 691 | @override |
| 642 | - String get todayFaqWatchNoNotificationReinstall => '5. 重装DoubleFeel 并重启AppleWatch与iPhone。'; | 692 | + String get todayFaqWatchNoNotificationReinstall => |
| 693 | + '5. 重装DoubleFeel 并重启AppleWatch与iPhone。'; | ||
| 643 | 694 | ||
| 644 | @override | 695 | @override |
| 645 | String get todayFaqWatchFaceDelayTitle => '手表表盘数据不更新或有延迟?'; | 696 | String get todayFaqWatchFaceDelayTitle => '手表表盘数据不更新或有延迟?'; |
| 646 | 697 | ||
| 647 | @override | 698 | @override |
| 648 | - String get todayFaqWatchFaceDelayDescription1 => '由于苹果系统限制,所有手表表盘(第三方或官方)都会存在几分钟至半小时的延迟,开发者无法控制刷新频率。'; | 699 | + String get todayFaqWatchFaceDelayDescription1 => |
| 700 | + '由于苹果系统限制,所有手表表盘(第三方或官方)都会存在几分钟至半小时的延迟,开发者无法控制刷新频率。'; | ||
| 649 | 701 | ||
| 650 | @override | 702 | @override |
| 651 | String get todayFaqWatchFaceDelayIfOverOneHour => '若手机数据刷新后超过1小时表盘仍未更新:'; | 703 | String get todayFaqWatchFaceDelayIfOverOneHour => '若手机数据刷新后超过1小时表盘仍未更新:'; |
| 652 | 704 | ||
| 653 | @override | 705 | @override |
| 654 | - String get todayFaqWatchFaceDelayOpenWatchApp => '请在手表上手动打开DoubleFeel,等待约1分钟。'; | 706 | + String get todayFaqWatchFaceDelayOpenWatchApp => |
| 707 | + '请在手表上手动打开DoubleFeel,等待约1分钟。'; | ||
| 655 | 708 | ||
| 656 | @override | 709 | @override |
| 657 | String get todayFaqWatchFaceDelayIfStill => '若仍未更新:'; | 710 | String get todayFaqWatchFaceDelayIfStill => '若仍未更新:'; |
| @@ -666,22 +719,27 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -666,22 +719,27 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 666 | String get todayFaqWatchFaceDelayCheckData => '· 手机和手表app是否可正常看到HRV数据。'; | 719 | String get todayFaqWatchFaceDelayCheckData => '· 手机和手表app是否可正常看到HRV数据。'; |
| 667 | 720 | ||
| 668 | @override | 721 | @override |
| 669 | - String get todayFaqWatchFaceDelayCheckPhoneHealth => '· 确保手机端「iOS设置-隐私与安全性-健康-DoubleFeel」全部授权。'; | 722 | + String get todayFaqWatchFaceDelayCheckPhoneHealth => |
| 723 | + '· 确保手机端「iOS设置-隐私与安全性-健康-DoubleFeel」全部授权。'; | ||
| 670 | 724 | ||
| 671 | @override | 725 | @override |
| 672 | - String get todayFaqWatchFaceDelayCheckWatchHealth => '· 确保手表端「设置-健康-数据来源、App和服务-DoubleFeel」全部授权。'; | 726 | + String get todayFaqWatchFaceDelayCheckWatchHealth => |
| 727 | + '· 确保手表端「设置-健康-数据来源、App和服务-DoubleFeel」全部授权。'; | ||
| 673 | 728 | ||
| 674 | @override | 729 | @override |
| 675 | - String get todayFaqWatchFaceDelayCheckBackgroundRefresh => '· 确认AppleWatch-设置-通用-后台App刷新中DoubleFeel已开启。'; | 730 | + String get todayFaqWatchFaceDelayCheckBackgroundRefresh => |
| 731 | + '· 确认AppleWatch-设置-通用-后台App刷新中DoubleFeel已开启。'; | ||
| 676 | 732 | ||
| 677 | @override | 733 | @override |
| 678 | - String get todayFaqWatchFaceDelayRestartWatch => '· 若仍未自动刷新,请重启手表。长时间运行或后台占用过高可能导致表盘暂停更新。'; | 734 | + String get todayFaqWatchFaceDelayRestartWatch => |
| 735 | + '· 若仍未自动刷新,请重启手表。长时间运行或后台占用过高可能导致表盘暂停更新。'; | ||
| 679 | 736 | ||
| 680 | @override | 737 | @override |
| 681 | String get todayFaqWatchFaceBlackScreenTitle => '手表表盘出现黑屏?'; | 738 | String get todayFaqWatchFaceBlackScreenTitle => '手表表盘出现黑屏?'; |
| 682 | 739 | ||
| 683 | @override | 740 | @override |
| 684 | - String get todayFaqWatchFaceBlackScreenDescription => '若添加专属互动表盘后出现黑屏(仅显示时间和日期),可长按表盘,点击「编辑」,左滑至「复杂功能」,选择 DoubleFeel,然后按需选择各组件重新添加。'; | 741 | + String get todayFaqWatchFaceBlackScreenDescription => |
| 742 | + '若添加专属互动表盘后出现黑屏(仅显示时间和日期),可长按表盘,点击「编辑」,左滑至「复杂功能」,选择 DoubleFeel,然后按需选择各组件重新添加。'; | ||
| 685 | 743 | ||
| 686 | @override | 744 | @override |
| 687 | String get today => '今天'; | 745 | String get today => '今天'; |
| @@ -765,7 +823,8 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -765,7 +823,8 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 765 | String get questionsAndFeedback => '问题和反馈'; | 823 | String get questionsAndFeedback => '问题和反馈'; |
| 766 | 824 | ||
| 767 | @override | 825 | @override |
| 768 | - String get ifYouWouldLikeUsToReplyPleaseProvideYourEmailAddress => '如果需要我们回复,请填写联系邮箱'; | 826 | + String get ifYouWouldLikeUsToReplyPleaseProvideYourEmailAddress => |
| 827 | + '如果需要我们回复,请填写联系邮箱'; | ||
| 769 | 828 | ||
| 770 | @override | 829 | @override |
| 771 | String get uploadProof => '上传凭证'; | 830 | String get uploadProof => '上传凭证'; |
| @@ -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 HealthUploadResult { | 33 | class HealthUploadResult { |
| 35 | HealthUploadResult({ | 34 | HealthUploadResult({ |
| 36 | required this.commonUploadSuccess, | 35 | required this.commonUploadSuccess, |
| @@ -53,8 +52,7 @@ class HealthUploadResult { | @@ -53,8 +52,7 @@ class HealthUploadResult { | ||
| 53 | } | 52 | } |
| 54 | 53 | ||
| 55 | Object encode() { | 54 | Object encode() { |
| 56 | - return _toList(); | ||
| 57 | - } | 55 | + return _toList(); } |
| 58 | 56 | ||
| 59 | static HealthUploadResult decode(Object result) { | 57 | static HealthUploadResult decode(Object result) { |
| 60 | result as List<Object?>; | 58 | result as List<Object?>; |
| @@ -79,7 +77,8 @@ class HealthUploadResult { | @@ -79,7 +77,8 @@ class HealthUploadResult { | ||
| 79 | 77 | ||
| 80 | @override | 78 | @override |
| 81 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 79 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
| 82 | - int get hashCode => Object.hashAll(_toList()); | 80 | + int get hashCode => Object.hashAll(_toList()) |
| 81 | +; | ||
| 83 | } | 82 | } |
| 84 | 83 | ||
| 85 | class HealthUploadDataPoint { | 84 | class HealthUploadDataPoint { |
| @@ -104,8 +103,7 @@ class HealthUploadDataPoint { | @@ -104,8 +103,7 @@ class HealthUploadDataPoint { | ||
| 104 | } | 103 | } |
| 105 | 104 | ||
| 106 | Object encode() { | 105 | Object encode() { |
| 107 | - return _toList(); | ||
| 108 | - } | 106 | + return _toList(); } |
| 109 | 107 | ||
| 110 | static HealthUploadDataPoint decode(Object result) { | 108 | static HealthUploadDataPoint decode(Object result) { |
| 111 | result as List<Object?>; | 109 | result as List<Object?>; |
| @@ -130,7 +128,8 @@ class HealthUploadDataPoint { | @@ -130,7 +128,8 @@ class HealthUploadDataPoint { | ||
| 130 | 128 | ||
| 131 | @override | 129 | @override |
| 132 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 130 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
| 133 | - int get hashCode => Object.hashAll(_toList()); | 131 | + int get hashCode => Object.hashAll(_toList()) |
| 132 | +; | ||
| 134 | } | 133 | } |
| 135 | 134 | ||
| 136 | class HealthSleepUploadDataPoint { | 135 | class HealthSleepUploadDataPoint { |
| @@ -155,8 +154,7 @@ class HealthSleepUploadDataPoint { | @@ -155,8 +154,7 @@ class HealthSleepUploadDataPoint { | ||
| 155 | } | 154 | } |
| 156 | 155 | ||
| 157 | Object encode() { | 156 | Object encode() { |
| 158 | - return _toList(); | ||
| 159 | - } | 157 | + return _toList(); } |
| 160 | 158 | ||
| 161 | static HealthSleepUploadDataPoint decode(Object result) { | 159 | static HealthSleepUploadDataPoint decode(Object result) { |
| 162 | result as List<Object?>; | 160 | result as List<Object?>; |
| @@ -170,8 +168,7 @@ class HealthSleepUploadDataPoint { | @@ -170,8 +168,7 @@ class HealthSleepUploadDataPoint { | ||
| 170 | @override | 168 | @override |
| 171 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 169 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
| 172 | bool operator ==(Object other) { | 170 | bool operator ==(Object other) { |
| 173 | - if (other is! HealthSleepUploadDataPoint || | ||
| 174 | - other.runtimeType != runtimeType) { | 171 | + if (other is! HealthSleepUploadDataPoint || other.runtimeType != runtimeType) { |
| 175 | return false; | 172 | return false; |
| 176 | } | 173 | } |
| 177 | if (identical(this, other)) { | 174 | if (identical(this, other)) { |
| @@ -182,7 +179,8 @@ class HealthSleepUploadDataPoint { | @@ -182,7 +179,8 @@ class HealthSleepUploadDataPoint { | ||
| 182 | 179 | ||
| 183 | @override | 180 | @override |
| 184 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 181 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
| 185 | - int get hashCode => Object.hashAll(_toList()); | 182 | + int get hashCode => Object.hashAll(_toList()) |
| 183 | +; | ||
| 186 | } | 184 | } |
| 187 | 185 | ||
| 188 | class HealthActivityTargetData { | 186 | class HealthActivityTargetData { |
| @@ -203,8 +201,7 @@ class HealthActivityTargetData { | @@ -203,8 +201,7 @@ class HealthActivityTargetData { | ||
| 203 | } | 201 | } |
| 204 | 202 | ||
| 205 | Object encode() { | 203 | Object encode() { |
| 206 | - return _toList(); | ||
| 207 | - } | 204 | + return _toList(); } |
| 208 | 205 | ||
| 209 | static HealthActivityTargetData decode(Object result) { | 206 | static HealthActivityTargetData decode(Object result) { |
| 210 | result as List<Object?>; | 207 | result as List<Object?>; |
| @@ -217,8 +214,7 @@ class HealthActivityTargetData { | @@ -217,8 +214,7 @@ class HealthActivityTargetData { | ||
| 217 | @override | 214 | @override |
| 218 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 215 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
| 219 | bool operator ==(Object other) { | 216 | bool operator ==(Object other) { |
| 220 | - if (other is! HealthActivityTargetData || | ||
| 221 | - other.runtimeType != runtimeType) { | 217 | + if (other is! HealthActivityTargetData || other.runtimeType != runtimeType) { |
| 222 | return false; | 218 | return false; |
| 223 | } | 219 | } |
| 224 | if (identical(this, other)) { | 220 | if (identical(this, other)) { |
| @@ -229,9 +225,11 @@ class HealthActivityTargetData { | @@ -229,9 +225,11 @@ class HealthActivityTargetData { | ||
| 229 | 225 | ||
| 230 | @override | 226 | @override |
| 231 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 227 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
| 232 | - int get hashCode => Object.hashAll(_toList()); | 228 | + int get hashCode => Object.hashAll(_toList()) |
| 229 | +; | ||
| 233 | } | 230 | } |
| 234 | 231 | ||
| 232 | + | ||
| 235 | class _PigeonCodec extends StandardMessageCodec { | 233 | class _PigeonCodec extends StandardMessageCodec { |
| 236 | const _PigeonCodec(); | 234 | const _PigeonCodec(); |
| 237 | @override | 235 | @override |
| @@ -239,16 +237,16 @@ class _PigeonCodec extends StandardMessageCodec { | @@ -239,16 +237,16 @@ class _PigeonCodec extends StandardMessageCodec { | ||
| 239 | if (value is int) { | 237 | if (value is int) { |
| 240 | buffer.putUint8(4); | 238 | buffer.putUint8(4); |
| 241 | buffer.putInt64(value); | 239 | buffer.putInt64(value); |
| 242 | - } else if (value is HealthUploadResult) { | 240 | + } else if (value is HealthUploadResult) { |
| 243 | buffer.putUint8(129); | 241 | buffer.putUint8(129); |
| 244 | writeValue(buffer, value.encode()); | 242 | writeValue(buffer, value.encode()); |
| 245 | - } else if (value is HealthUploadDataPoint) { | 243 | + } else if (value is HealthUploadDataPoint) { |
| 246 | buffer.putUint8(130); | 244 | buffer.putUint8(130); |
| 247 | writeValue(buffer, value.encode()); | 245 | writeValue(buffer, value.encode()); |
| 248 | - } else if (value is HealthSleepUploadDataPoint) { | 246 | + } else if (value is HealthSleepUploadDataPoint) { |
| 249 | buffer.putUint8(131); | 247 | buffer.putUint8(131); |
| 250 | writeValue(buffer, value.encode()); | 248 | writeValue(buffer, value.encode()); |
| 251 | - } else if (value is HealthActivityTargetData) { | 249 | + } else if (value is HealthActivityTargetData) { |
| 252 | buffer.putUint8(132); | 250 | buffer.putUint8(132); |
| 253 | writeValue(buffer, value.encode()); | 251 | writeValue(buffer, value.encode()); |
| 254 | } else { | 252 | } else { |
| @@ -259,13 +257,13 @@ class _PigeonCodec extends StandardMessageCodec { | @@ -259,13 +257,13 @@ class _PigeonCodec extends StandardMessageCodec { | ||
| 259 | @override | 257 | @override |
| 260 | Object? readValueOfType(int type, ReadBuffer buffer) { | 258 | Object? readValueOfType(int type, ReadBuffer buffer) { |
| 261 | switch (type) { | 259 | switch (type) { |
| 262 | - case 129: | 260 | + case 129: |
| 263 | return HealthUploadResult.decode(readValue(buffer)!); | 261 | return HealthUploadResult.decode(readValue(buffer)!); |
| 264 | - case 130: | 262 | + case 130: |
| 265 | return HealthUploadDataPoint.decode(readValue(buffer)!); | 263 | return HealthUploadDataPoint.decode(readValue(buffer)!); |
| 266 | - case 131: | 264 | + case 131: |
| 267 | return HealthSleepUploadDataPoint.decode(readValue(buffer)!); | 265 | return HealthSleepUploadDataPoint.decode(readValue(buffer)!); |
| 268 | - case 132: | 266 | + case 132: |
| 269 | return HealthActivityTargetData.decode(readValue(buffer)!); | 267 | return HealthActivityTargetData.decode(readValue(buffer)!); |
| 270 | default: | 268 | default: |
| 271 | return super.readValueOfType(type, buffer); | 269 | return super.readValueOfType(type, buffer); |
| @@ -277,11 +275,9 @@ class HealthKitHostApi { | @@ -277,11 +275,9 @@ class HealthKitHostApi { | ||
| 277 | /// Constructor for [HealthKitHostApi]. The [binaryMessenger] named argument is | 275 | /// Constructor for [HealthKitHostApi]. The [binaryMessenger] named argument is |
| 278 | /// available for dependency injection. If it is left null, the default | 276 | /// available for dependency injection. If it is left null, the default |
| 279 | /// BinaryMessenger will be used which routes to the host platform. | 277 | /// BinaryMessenger will be used which routes to the host platform. |
| 280 | - HealthKitHostApi( | ||
| 281 | - {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) | 278 | + HealthKitHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) |
| 282 | : pigeonVar_binaryMessenger = binaryMessenger, | 279 | : pigeonVar_binaryMessenger = binaryMessenger, |
| 283 | - pigeonVar_messageChannelSuffix = | ||
| 284 | - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; | 280 | + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; |
| 285 | final BinaryMessenger? pigeonVar_binaryMessenger; | 281 | final BinaryMessenger? pigeonVar_binaryMessenger; |
| 286 | 282 | ||
| 287 | static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec(); | 283 | static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec(); |
| @@ -289,10 +285,8 @@ class HealthKitHostApi { | @@ -289,10 +285,8 @@ class HealthKitHostApi { | ||
| 289 | final String pigeonVar_messageChannelSuffix; | 285 | final String pigeonVar_messageChannelSuffix; |
| 290 | 286 | ||
| 291 | Future<bool> checkHealthAppAuthorization() async { | 287 | Future<bool> checkHealthAppAuthorization() async { |
| 292 | - final String pigeonVar_channelName = | ||
| 293 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization$pigeonVar_messageChannelSuffix'; | ||
| 294 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 295 | - BasicMessageChannel<Object?>( | 288 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.checkHealthAppAuthorization$pigeonVar_messageChannelSuffix'; |
| 289 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 296 | pigeonVar_channelName, | 290 | pigeonVar_channelName, |
| 297 | pigeonChannelCodec, | 291 | pigeonChannelCodec, |
| 298 | binaryMessenger: pigeonVar_binaryMessenger, | 292 | binaryMessenger: pigeonVar_binaryMessenger, |
| @@ -319,10 +313,8 @@ class HealthKitHostApi { | @@ -319,10 +313,8 @@ class HealthKitHostApi { | ||
| 319 | } | 313 | } |
| 320 | 314 | ||
| 321 | Future<String> getHealthServerAuthUrl() async { | 315 | Future<String> getHealthServerAuthUrl() async { |
| 322 | - final String pigeonVar_channelName = | ||
| 323 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl$pigeonVar_messageChannelSuffix'; | ||
| 324 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 325 | - BasicMessageChannel<Object?>( | 316 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.getHealthServerAuthUrl$pigeonVar_messageChannelSuffix'; |
| 317 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 326 | pigeonVar_channelName, | 318 | pigeonVar_channelName, |
| 327 | pigeonChannelCodec, | 319 | pigeonChannelCodec, |
| 328 | binaryMessenger: pigeonVar_binaryMessenger, | 320 | binaryMessenger: pigeonVar_binaryMessenger, |
| @@ -350,10 +342,8 @@ class HealthKitHostApi { | @@ -350,10 +342,8 @@ class HealthKitHostApi { | ||
| 350 | 342 | ||
| 351 | /// Opens Huawei Health client authorization UI. Returns whether user granted. | 343 | /// Opens Huawei Health client authorization UI. Returns whether user granted. |
| 352 | Future<bool> requestHealthClientAuthorization() async { | 344 | Future<bool> requestHealthClientAuthorization() async { |
| 353 | - final String pigeonVar_channelName = | ||
| 354 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.requestHealthClientAuthorization$pigeonVar_messageChannelSuffix'; | ||
| 355 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 356 | - BasicMessageChannel<Object?>( | 345 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.requestHealthClientAuthorization$pigeonVar_messageChannelSuffix'; |
| 346 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 357 | pigeonVar_channelName, | 347 | pigeonVar_channelName, |
| 358 | pigeonChannelCodec, | 348 | pigeonChannelCodec, |
| 359 | binaryMessenger: pigeonVar_binaryMessenger, | 349 | binaryMessenger: pigeonVar_binaryMessenger, |
| @@ -380,10 +370,8 @@ class HealthKitHostApi { | @@ -380,10 +370,8 @@ class HealthKitHostApi { | ||
| 380 | } | 370 | } |
| 381 | 371 | ||
| 382 | Future<bool> cancelHealthAppAuthorization() async { | 372 | Future<bool> cancelHealthAppAuthorization() async { |
| 383 | - final String pigeonVar_channelName = | ||
| 384 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.cancelHealthAppAuthorization$pigeonVar_messageChannelSuffix'; | ||
| 385 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 386 | - BasicMessageChannel<Object?>( | 373 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.cancelHealthAppAuthorization$pigeonVar_messageChannelSuffix'; |
| 374 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 387 | pigeonVar_channelName, | 375 | pigeonVar_channelName, |
| 388 | pigeonChannelCodec, | 376 | pigeonChannelCodec, |
| 389 | binaryMessenger: pigeonVar_binaryMessenger, | 377 | binaryMessenger: pigeonVar_binaryMessenger, |
| @@ -411,10 +399,8 @@ class HealthKitHostApi { | @@ -411,10 +399,8 @@ class HealthKitHostApi { | ||
| 411 | 399 | ||
| 412 | /// Runs native health read and server upload pipeline. | 400 | /// Runs native health read and server upload pipeline. |
| 413 | Future<HealthUploadResult> performHealthUpload() async { | 401 | Future<HealthUploadResult> performHealthUpload() async { |
| 414 | - final String pigeonVar_channelName = | ||
| 415 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.performHealthUpload$pigeonVar_messageChannelSuffix'; | ||
| 416 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 417 | - BasicMessageChannel<Object?>( | 402 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.performHealthUpload$pigeonVar_messageChannelSuffix'; |
| 403 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 418 | pigeonVar_channelName, | 404 | pigeonVar_channelName, |
| 419 | pigeonChannelCodec, | 405 | pigeonChannelCodec, |
| 420 | binaryMessenger: pigeonVar_binaryMessenger, | 406 | binaryMessenger: pigeonVar_binaryMessenger, |
| @@ -440,18 +426,14 @@ class HealthKitHostApi { | @@ -440,18 +426,14 @@ class HealthKitHostApi { | ||
| 440 | } | 426 | } |
| 441 | } | 427 | } |
| 442 | 428 | ||
| 443 | - Future<List<HealthUploadDataPoint>> fetchHrvData( | ||
| 444 | - int startTime, int endTime) async { | ||
| 445 | - final String pigeonVar_channelName = | ||
| 446 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchHrvData$pigeonVar_messageChannelSuffix'; | ||
| 447 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 448 | - BasicMessageChannel<Object?>( | 429 | + Future<List<HealthUploadDataPoint>> fetchHrvData(int startTime, int endTime) async { |
| 430 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchHrvData$pigeonVar_messageChannelSuffix'; | ||
| 431 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 449 | pigeonVar_channelName, | 432 | pigeonVar_channelName, |
| 450 | pigeonChannelCodec, | 433 | pigeonChannelCodec, |
| 451 | binaryMessenger: pigeonVar_binaryMessenger, | 434 | binaryMessenger: pigeonVar_binaryMessenger, |
| 452 | ); | 435 | ); |
| 453 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 454 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 436 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 455 | final List<Object?>? pigeonVar_replyList = | 437 | final List<Object?>? pigeonVar_replyList = |
| 456 | await pigeonVar_sendFuture as List<Object?>?; | 438 | await pigeonVar_sendFuture as List<Object?>?; |
| 457 | if (pigeonVar_replyList == null) { | 439 | if (pigeonVar_replyList == null) { |
| @@ -468,23 +450,18 @@ class HealthKitHostApi { | @@ -468,23 +450,18 @@ class HealthKitHostApi { | ||
| 468 | message: 'Host platform returned null value for non-null return value.', | 450 | message: 'Host platform returned null value for non-null return value.', |
| 469 | ); | 451 | ); |
| 470 | } else { | 452 | } else { |
| 471 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 472 | - .cast<HealthUploadDataPoint>(); | 453 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 473 | } | 454 | } |
| 474 | } | 455 | } |
| 475 | 456 | ||
| 476 | - Future<List<HealthUploadDataPoint>> fetchHeartRateData( | ||
| 477 | - int startTime, int endTime) async { | ||
| 478 | - final String pigeonVar_channelName = | ||
| 479 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 480 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 481 | - BasicMessageChannel<Object?>( | 457 | + Future<List<HealthUploadDataPoint>> fetchHeartRateData(int startTime, int endTime) async { |
| 458 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 459 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 482 | pigeonVar_channelName, | 460 | pigeonVar_channelName, |
| 483 | pigeonChannelCodec, | 461 | pigeonChannelCodec, |
| 484 | binaryMessenger: pigeonVar_binaryMessenger, | 462 | binaryMessenger: pigeonVar_binaryMessenger, |
| 485 | ); | 463 | ); |
| 486 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 487 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 464 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 488 | final List<Object?>? pigeonVar_replyList = | 465 | final List<Object?>? pigeonVar_replyList = |
| 489 | await pigeonVar_sendFuture as List<Object?>?; | 466 | await pigeonVar_sendFuture as List<Object?>?; |
| 490 | if (pigeonVar_replyList == null) { | 467 | if (pigeonVar_replyList == null) { |
| @@ -501,23 +478,18 @@ class HealthKitHostApi { | @@ -501,23 +478,18 @@ class HealthKitHostApi { | ||
| 501 | message: 'Host platform returned null value for non-null return value.', | 478 | message: 'Host platform returned null value for non-null return value.', |
| 502 | ); | 479 | ); |
| 503 | } else { | 480 | } else { |
| 504 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 505 | - .cast<HealthUploadDataPoint>(); | 481 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 506 | } | 482 | } |
| 507 | } | 483 | } |
| 508 | 484 | ||
| 509 | - Future<List<HealthUploadDataPoint>> fetchWalkingHeartRateData( | ||
| 510 | - int startTime, int endTime) async { | ||
| 511 | - final String pigeonVar_channelName = | ||
| 512 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchWalkingHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 513 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 514 | - BasicMessageChannel<Object?>( | 485 | + Future<List<HealthUploadDataPoint>> fetchWalkingHeartRateData(int startTime, int endTime) async { |
| 486 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchWalkingHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 487 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 515 | pigeonVar_channelName, | 488 | pigeonVar_channelName, |
| 516 | pigeonChannelCodec, | 489 | pigeonChannelCodec, |
| 517 | binaryMessenger: pigeonVar_binaryMessenger, | 490 | binaryMessenger: pigeonVar_binaryMessenger, |
| 518 | ); | 491 | ); |
| 519 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 520 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 492 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 521 | final List<Object?>? pigeonVar_replyList = | 493 | final List<Object?>? pigeonVar_replyList = |
| 522 | await pigeonVar_sendFuture as List<Object?>?; | 494 | await pigeonVar_sendFuture as List<Object?>?; |
| 523 | if (pigeonVar_replyList == null) { | 495 | if (pigeonVar_replyList == null) { |
| @@ -534,23 +506,18 @@ class HealthKitHostApi { | @@ -534,23 +506,18 @@ class HealthKitHostApi { | ||
| 534 | message: 'Host platform returned null value for non-null return value.', | 506 | message: 'Host platform returned null value for non-null return value.', |
| 535 | ); | 507 | ); |
| 536 | } else { | 508 | } else { |
| 537 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 538 | - .cast<HealthUploadDataPoint>(); | 509 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 539 | } | 510 | } |
| 540 | } | 511 | } |
| 541 | 512 | ||
| 542 | - Future<List<HealthUploadDataPoint>> fetchRestingHeartRateData( | ||
| 543 | - int startTime, int endTime) async { | ||
| 544 | - final String pigeonVar_channelName = | ||
| 545 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchRestingHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 546 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 547 | - BasicMessageChannel<Object?>( | 513 | + Future<List<HealthUploadDataPoint>> fetchRestingHeartRateData(int startTime, int endTime) async { |
| 514 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchRestingHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 515 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 548 | pigeonVar_channelName, | 516 | pigeonVar_channelName, |
| 549 | pigeonChannelCodec, | 517 | pigeonChannelCodec, |
| 550 | binaryMessenger: pigeonVar_binaryMessenger, | 518 | binaryMessenger: pigeonVar_binaryMessenger, |
| 551 | ); | 519 | ); |
| 552 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 553 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 520 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 554 | final List<Object?>? pigeonVar_replyList = | 521 | final List<Object?>? pigeonVar_replyList = |
| 555 | await pigeonVar_sendFuture as List<Object?>?; | 522 | await pigeonVar_sendFuture as List<Object?>?; |
| 556 | if (pigeonVar_replyList == null) { | 523 | if (pigeonVar_replyList == null) { |
| @@ -567,23 +534,18 @@ class HealthKitHostApi { | @@ -567,23 +534,18 @@ class HealthKitHostApi { | ||
| 567 | message: 'Host platform returned null value for non-null return value.', | 534 | message: 'Host platform returned null value for non-null return value.', |
| 568 | ); | 535 | ); |
| 569 | } else { | 536 | } else { |
| 570 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 571 | - .cast<HealthUploadDataPoint>(); | 537 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 572 | } | 538 | } |
| 573 | } | 539 | } |
| 574 | 540 | ||
| 575 | - Future<List<HealthUploadDataPoint>> fetchSleepingHeartRateData( | ||
| 576 | - int startTime, int endTime) async { | ||
| 577 | - final String pigeonVar_channelName = | ||
| 578 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchSleepingHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 579 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 580 | - BasicMessageChannel<Object?>( | 541 | + Future<List<HealthUploadDataPoint>> fetchSleepingHeartRateData(int startTime, int endTime) async { |
| 542 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchSleepingHeartRateData$pigeonVar_messageChannelSuffix'; | ||
| 543 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 581 | pigeonVar_channelName, | 544 | pigeonVar_channelName, |
| 582 | pigeonChannelCodec, | 545 | pigeonChannelCodec, |
| 583 | binaryMessenger: pigeonVar_binaryMessenger, | 546 | binaryMessenger: pigeonVar_binaryMessenger, |
| 584 | ); | 547 | ); |
| 585 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 586 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 548 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 587 | final List<Object?>? pigeonVar_replyList = | 549 | final List<Object?>? pigeonVar_replyList = |
| 588 | await pigeonVar_sendFuture as List<Object?>?; | 550 | await pigeonVar_sendFuture as List<Object?>?; |
| 589 | if (pigeonVar_replyList == null) { | 551 | if (pigeonVar_replyList == null) { |
| @@ -600,23 +562,18 @@ class HealthKitHostApi { | @@ -600,23 +562,18 @@ class HealthKitHostApi { | ||
| 600 | message: 'Host platform returned null value for non-null return value.', | 562 | message: 'Host platform returned null value for non-null return value.', |
| 601 | ); | 563 | ); |
| 602 | } else { | 564 | } else { |
| 603 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 604 | - .cast<HealthUploadDataPoint>(); | 565 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 605 | } | 566 | } |
| 606 | } | 567 | } |
| 607 | 568 | ||
| 608 | - Future<List<HealthUploadDataPoint>> fetchOxygenSaturationData( | ||
| 609 | - int startTime, int endTime) async { | ||
| 610 | - final String pigeonVar_channelName = | ||
| 611 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchOxygenSaturationData$pigeonVar_messageChannelSuffix'; | ||
| 612 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 613 | - BasicMessageChannel<Object?>( | 569 | + Future<List<HealthUploadDataPoint>> fetchOxygenSaturationData(int startTime, int endTime) async { |
| 570 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchOxygenSaturationData$pigeonVar_messageChannelSuffix'; | ||
| 571 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 614 | pigeonVar_channelName, | 572 | pigeonVar_channelName, |
| 615 | pigeonChannelCodec, | 573 | pigeonChannelCodec, |
| 616 | binaryMessenger: pigeonVar_binaryMessenger, | 574 | binaryMessenger: pigeonVar_binaryMessenger, |
| 617 | ); | 575 | ); |
| 618 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 619 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 576 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 620 | final List<Object?>? pigeonVar_replyList = | 577 | final List<Object?>? pigeonVar_replyList = |
| 621 | await pigeonVar_sendFuture as List<Object?>?; | 578 | await pigeonVar_sendFuture as List<Object?>?; |
| 622 | if (pigeonVar_replyList == null) { | 579 | if (pigeonVar_replyList == null) { |
| @@ -633,23 +590,18 @@ class HealthKitHostApi { | @@ -633,23 +590,18 @@ class HealthKitHostApi { | ||
| 633 | message: 'Host platform returned null value for non-null return value.', | 590 | message: 'Host platform returned null value for non-null return value.', |
| 634 | ); | 591 | ); |
| 635 | } else { | 592 | } else { |
| 636 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 637 | - .cast<HealthUploadDataPoint>(); | 593 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 638 | } | 594 | } |
| 639 | } | 595 | } |
| 640 | 596 | ||
| 641 | - Future<List<HealthUploadDataPoint>> fetchActiveEnergyData( | ||
| 642 | - int startTime, int endTime) async { | ||
| 643 | - final String pigeonVar_channelName = | ||
| 644 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchActiveEnergyData$pigeonVar_messageChannelSuffix'; | ||
| 645 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 646 | - BasicMessageChannel<Object?>( | 597 | + Future<List<HealthUploadDataPoint>> fetchActiveEnergyData(int startTime, int endTime) async { |
| 598 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchActiveEnergyData$pigeonVar_messageChannelSuffix'; | ||
| 599 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 647 | pigeonVar_channelName, | 600 | pigeonVar_channelName, |
| 648 | pigeonChannelCodec, | 601 | pigeonChannelCodec, |
| 649 | binaryMessenger: pigeonVar_binaryMessenger, | 602 | binaryMessenger: pigeonVar_binaryMessenger, |
| 650 | ); | 603 | ); |
| 651 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 652 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 604 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 653 | final List<Object?>? pigeonVar_replyList = | 605 | final List<Object?>? pigeonVar_replyList = |
| 654 | await pigeonVar_sendFuture as List<Object?>?; | 606 | await pigeonVar_sendFuture as List<Object?>?; |
| 655 | if (pigeonVar_replyList == null) { | 607 | if (pigeonVar_replyList == null) { |
| @@ -666,23 +618,18 @@ class HealthKitHostApi { | @@ -666,23 +618,18 @@ class HealthKitHostApi { | ||
| 666 | message: 'Host platform returned null value for non-null return value.', | 618 | message: 'Host platform returned null value for non-null return value.', |
| 667 | ); | 619 | ); |
| 668 | } else { | 620 | } else { |
| 669 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 670 | - .cast<HealthUploadDataPoint>(); | 621 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 671 | } | 622 | } |
| 672 | } | 623 | } |
| 673 | 624 | ||
| 674 | - Future<List<HealthUploadDataPoint>> fetchExerciseData( | ||
| 675 | - int startTime, int endTime) async { | ||
| 676 | - final String pigeonVar_channelName = | ||
| 677 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchExerciseData$pigeonVar_messageChannelSuffix'; | ||
| 678 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 679 | - BasicMessageChannel<Object?>( | 625 | + Future<List<HealthUploadDataPoint>> fetchExerciseData(int startTime, int endTime) async { |
| 626 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchExerciseData$pigeonVar_messageChannelSuffix'; | ||
| 627 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 680 | pigeonVar_channelName, | 628 | pigeonVar_channelName, |
| 681 | pigeonChannelCodec, | 629 | pigeonChannelCodec, |
| 682 | binaryMessenger: pigeonVar_binaryMessenger, | 630 | binaryMessenger: pigeonVar_binaryMessenger, |
| 683 | ); | 631 | ); |
| 684 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 685 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 632 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 686 | final List<Object?>? pigeonVar_replyList = | 633 | final List<Object?>? pigeonVar_replyList = |
| 687 | await pigeonVar_sendFuture as List<Object?>?; | 634 | await pigeonVar_sendFuture as List<Object?>?; |
| 688 | if (pigeonVar_replyList == null) { | 635 | if (pigeonVar_replyList == null) { |
| @@ -699,23 +646,18 @@ class HealthKitHostApi { | @@ -699,23 +646,18 @@ class HealthKitHostApi { | ||
| 699 | message: 'Host platform returned null value for non-null return value.', | 646 | message: 'Host platform returned null value for non-null return value.', |
| 700 | ); | 647 | ); |
| 701 | } else { | 648 | } else { |
| 702 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 703 | - .cast<HealthUploadDataPoint>(); | 649 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 704 | } | 650 | } |
| 705 | } | 651 | } |
| 706 | 652 | ||
| 707 | - Future<List<HealthUploadDataPoint>> fetchStandData( | ||
| 708 | - int startTime, int endTime) async { | ||
| 709 | - final String pigeonVar_channelName = | ||
| 710 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchStandData$pigeonVar_messageChannelSuffix'; | ||
| 711 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 712 | - BasicMessageChannel<Object?>( | 653 | + Future<List<HealthUploadDataPoint>> fetchStandData(int startTime, int endTime) async { |
| 654 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchStandData$pigeonVar_messageChannelSuffix'; | ||
| 655 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 713 | pigeonVar_channelName, | 656 | pigeonVar_channelName, |
| 714 | pigeonChannelCodec, | 657 | pigeonChannelCodec, |
| 715 | binaryMessenger: pigeonVar_binaryMessenger, | 658 | binaryMessenger: pigeonVar_binaryMessenger, |
| 716 | ); | 659 | ); |
| 717 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 718 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 660 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 719 | final List<Object?>? pigeonVar_replyList = | 661 | final List<Object?>? pigeonVar_replyList = |
| 720 | await pigeonVar_sendFuture as List<Object?>?; | 662 | await pigeonVar_sendFuture as List<Object?>?; |
| 721 | if (pigeonVar_replyList == null) { | 663 | if (pigeonVar_replyList == null) { |
| @@ -732,23 +674,18 @@ class HealthKitHostApi { | @@ -732,23 +674,18 @@ class HealthKitHostApi { | ||
| 732 | message: 'Host platform returned null value for non-null return value.', | 674 | message: 'Host platform returned null value for non-null return value.', |
| 733 | ); | 675 | ); |
| 734 | } else { | 676 | } else { |
| 735 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 736 | - .cast<HealthUploadDataPoint>(); | 677 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 737 | } | 678 | } |
| 738 | } | 679 | } |
| 739 | 680 | ||
| 740 | - Future<List<HealthUploadDataPoint>> fetchStepCountData( | ||
| 741 | - int startTime, int endTime) async { | ||
| 742 | - final String pigeonVar_channelName = | ||
| 743 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchStepCountData$pigeonVar_messageChannelSuffix'; | ||
| 744 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 745 | - BasicMessageChannel<Object?>( | 681 | + Future<List<HealthUploadDataPoint>> fetchStepCountData(int startTime, int endTime) async { |
| 682 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchStepCountData$pigeonVar_messageChannelSuffix'; | ||
| 683 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 746 | pigeonVar_channelName, | 684 | pigeonVar_channelName, |
| 747 | pigeonChannelCodec, | 685 | pigeonChannelCodec, |
| 748 | binaryMessenger: pigeonVar_binaryMessenger, | 686 | binaryMessenger: pigeonVar_binaryMessenger, |
| 749 | ); | 687 | ); |
| 750 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 751 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 688 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 752 | final List<Object?>? pigeonVar_replyList = | 689 | final List<Object?>? pigeonVar_replyList = |
| 753 | await pigeonVar_sendFuture as List<Object?>?; | 690 | await pigeonVar_sendFuture as List<Object?>?; |
| 754 | if (pigeonVar_replyList == null) { | 691 | if (pigeonVar_replyList == null) { |
| @@ -765,23 +702,18 @@ class HealthKitHostApi { | @@ -765,23 +702,18 @@ class HealthKitHostApi { | ||
| 765 | message: 'Host platform returned null value for non-null return value.', | 702 | message: 'Host platform returned null value for non-null return value.', |
| 766 | ); | 703 | ); |
| 767 | } else { | 704 | } else { |
| 768 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 769 | - .cast<HealthUploadDataPoint>(); | 705 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 770 | } | 706 | } |
| 771 | } | 707 | } |
| 772 | 708 | ||
| 773 | - Future<List<HealthSleepUploadDataPoint>> fetchSleepData( | ||
| 774 | - int startTime, int endTime) async { | ||
| 775 | - final String pigeonVar_channelName = | ||
| 776 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchSleepData$pigeonVar_messageChannelSuffix'; | ||
| 777 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 778 | - BasicMessageChannel<Object?>( | 709 | + Future<List<HealthSleepUploadDataPoint>> fetchSleepData(int startTime, int endTime) async { |
| 710 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchSleepData$pigeonVar_messageChannelSuffix'; | ||
| 711 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 779 | pigeonVar_channelName, | 712 | pigeonVar_channelName, |
| 780 | pigeonChannelCodec, | 713 | pigeonChannelCodec, |
| 781 | binaryMessenger: pigeonVar_binaryMessenger, | 714 | binaryMessenger: pigeonVar_binaryMessenger, |
| 782 | ); | 715 | ); |
| 783 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 784 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 716 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 785 | final List<Object?>? pigeonVar_replyList = | 717 | final List<Object?>? pigeonVar_replyList = |
| 786 | await pigeonVar_sendFuture as List<Object?>?; | 718 | await pigeonVar_sendFuture as List<Object?>?; |
| 787 | if (pigeonVar_replyList == null) { | 719 | if (pigeonVar_replyList == null) { |
| @@ -798,23 +730,18 @@ class HealthKitHostApi { | @@ -798,23 +730,18 @@ class HealthKitHostApi { | ||
| 798 | message: 'Host platform returned null value for non-null return value.', | 730 | message: 'Host platform returned null value for non-null return value.', |
| 799 | ); | 731 | ); |
| 800 | } else { | 732 | } else { |
| 801 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 802 | - .cast<HealthSleepUploadDataPoint>(); | 733 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthSleepUploadDataPoint>(); |
| 803 | } | 734 | } |
| 804 | } | 735 | } |
| 805 | 736 | ||
| 806 | - Future<List<HealthUploadDataPoint>> fetchSleepingWristTemperatureData( | ||
| 807 | - int startTime, int endTime) async { | ||
| 808 | - final String pigeonVar_channelName = | ||
| 809 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchSleepingWristTemperatureData$pigeonVar_messageChannelSuffix'; | ||
| 810 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 811 | - BasicMessageChannel<Object?>( | 737 | + Future<List<HealthUploadDataPoint>> fetchSleepingWristTemperatureData(int startTime, int endTime) async { |
| 738 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchSleepingWristTemperatureData$pigeonVar_messageChannelSuffix'; | ||
| 739 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 812 | pigeonVar_channelName, | 740 | pigeonVar_channelName, |
| 813 | pigeonChannelCodec, | 741 | pigeonChannelCodec, |
| 814 | binaryMessenger: pigeonVar_binaryMessenger, | 742 | binaryMessenger: pigeonVar_binaryMessenger, |
| 815 | ); | 743 | ); |
| 816 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 817 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 744 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 818 | final List<Object?>? pigeonVar_replyList = | 745 | final List<Object?>? pigeonVar_replyList = |
| 819 | await pigeonVar_sendFuture as List<Object?>?; | 746 | await pigeonVar_sendFuture as List<Object?>?; |
| 820 | if (pigeonVar_replyList == null) { | 747 | if (pigeonVar_replyList == null) { |
| @@ -831,23 +758,18 @@ class HealthKitHostApi { | @@ -831,23 +758,18 @@ class HealthKitHostApi { | ||
| 831 | message: 'Host platform returned null value for non-null return value.', | 758 | message: 'Host platform returned null value for non-null return value.', |
| 832 | ); | 759 | ); |
| 833 | } else { | 760 | } else { |
| 834 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 835 | - .cast<HealthUploadDataPoint>(); | 761 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 836 | } | 762 | } |
| 837 | } | 763 | } |
| 838 | 764 | ||
| 839 | - Future<List<HealthUploadDataPoint>> fetchRespiratoryRateData( | ||
| 840 | - int startTime, int endTime) async { | ||
| 841 | - final String pigeonVar_channelName = | ||
| 842 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchRespiratoryRateData$pigeonVar_messageChannelSuffix'; | ||
| 843 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 844 | - BasicMessageChannel<Object?>( | 765 | + Future<List<HealthUploadDataPoint>> fetchRespiratoryRateData(int startTime, int endTime) async { |
| 766 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchRespiratoryRateData$pigeonVar_messageChannelSuffix'; | ||
| 767 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 845 | pigeonVar_channelName, | 768 | pigeonVar_channelName, |
| 846 | pigeonChannelCodec, | 769 | pigeonChannelCodec, |
| 847 | binaryMessenger: pigeonVar_binaryMessenger, | 770 | binaryMessenger: pigeonVar_binaryMessenger, |
| 848 | ); | 771 | ); |
| 849 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 850 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 772 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 851 | final List<Object?>? pigeonVar_replyList = | 773 | final List<Object?>? pigeonVar_replyList = |
| 852 | await pigeonVar_sendFuture as List<Object?>?; | 774 | await pigeonVar_sendFuture as List<Object?>?; |
| 853 | if (pigeonVar_replyList == null) { | 775 | if (pigeonVar_replyList == null) { |
| @@ -864,23 +786,18 @@ class HealthKitHostApi { | @@ -864,23 +786,18 @@ class HealthKitHostApi { | ||
| 864 | message: 'Host platform returned null value for non-null return value.', | 786 | message: 'Host platform returned null value for non-null return value.', |
| 865 | ); | 787 | ); |
| 866 | } else { | 788 | } else { |
| 867 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 868 | - .cast<HealthUploadDataPoint>(); | 789 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 869 | } | 790 | } |
| 870 | } | 791 | } |
| 871 | 792 | ||
| 872 | - Future<List<HealthUploadDataPoint>> fetchIrregularHeartRhythmData( | ||
| 873 | - int startTime, int endTime) async { | ||
| 874 | - final String pigeonVar_channelName = | ||
| 875 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchIrregularHeartRhythmData$pigeonVar_messageChannelSuffix'; | ||
| 876 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 877 | - BasicMessageChannel<Object?>( | 793 | + Future<List<HealthUploadDataPoint>> fetchIrregularHeartRhythmData(int startTime, int endTime) async { |
| 794 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchIrregularHeartRhythmData$pigeonVar_messageChannelSuffix'; | ||
| 795 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 878 | pigeonVar_channelName, | 796 | pigeonVar_channelName, |
| 879 | pigeonChannelCodec, | 797 | pigeonChannelCodec, |
| 880 | binaryMessenger: pigeonVar_binaryMessenger, | 798 | binaryMessenger: pigeonVar_binaryMessenger, |
| 881 | ); | 799 | ); |
| 882 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 883 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 800 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 884 | final List<Object?>? pigeonVar_replyList = | 801 | final List<Object?>? pigeonVar_replyList = |
| 885 | await pigeonVar_sendFuture as List<Object?>?; | 802 | await pigeonVar_sendFuture as List<Object?>?; |
| 886 | if (pigeonVar_replyList == null) { | 803 | if (pigeonVar_replyList == null) { |
| @@ -897,23 +814,18 @@ class HealthKitHostApi { | @@ -897,23 +814,18 @@ class HealthKitHostApi { | ||
| 897 | message: 'Host platform returned null value for non-null return value.', | 814 | message: 'Host platform returned null value for non-null return value.', |
| 898 | ); | 815 | ); |
| 899 | } else { | 816 | } else { |
| 900 | - return (pigeonVar_replyList[0] as List<Object?>?)! | ||
| 901 | - .cast<HealthUploadDataPoint>(); | 817 | + return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HealthUploadDataPoint>(); |
| 902 | } | 818 | } |
| 903 | } | 819 | } |
| 904 | 820 | ||
| 905 | - Future<HealthActivityTargetData?> fetchActivityTargetData( | ||
| 906 | - int startTime, int endTime) async { | ||
| 907 | - final String pigeonVar_channelName = | ||
| 908 | - 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchActivityTargetData$pigeonVar_messageChannelSuffix'; | ||
| 909 | - final BasicMessageChannel<Object?> pigeonVar_channel = | ||
| 910 | - BasicMessageChannel<Object?>( | 821 | + Future<HealthActivityTargetData?> fetchActivityTargetData(int startTime, int endTime) async { |
| 822 | + final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.HealthKitHostApi.fetchActivityTargetData$pigeonVar_messageChannelSuffix'; | ||
| 823 | + final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( | ||
| 911 | pigeonVar_channelName, | 824 | pigeonVar_channelName, |
| 912 | pigeonChannelCodec, | 825 | pigeonChannelCodec, |
| 913 | binaryMessenger: pigeonVar_binaryMessenger, | 826 | binaryMessenger: pigeonVar_binaryMessenger, |
| 914 | ); | 827 | ); |
| 915 | - final Future<Object?> pigeonVar_sendFuture = | ||
| 916 | - pigeonVar_channel.send(<Object?>[startTime, endTime]); | 828 | + final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[startTime, endTime]); |
| 917 | final List<Object?>? pigeonVar_replyList = | 829 | final List<Object?>? pigeonVar_replyList = |
| 918 | await pigeonVar_sendFuture as List<Object?>?; | 830 | await pigeonVar_sendFuture as List<Object?>?; |
| 919 | if (pigeonVar_replyList == null) { | 831 | if (pigeonVar_replyList == null) { |
| @@ -64,8 +64,10 @@ class HealthActivityTargetData { | @@ -64,8 +64,10 @@ class HealthActivityTargetData { | ||
| 64 | ) | 64 | ) |
| 65 | @HostApi() | 65 | @HostApi() |
| 66 | abstract class HealthKitHostApi { | 66 | abstract class HealthKitHostApi { |
| 67 | + @async | ||
| 67 | bool checkHealthAppAuthorization(); | 68 | bool checkHealthAppAuthorization(); |
| 68 | 69 | ||
| 70 | +@async | ||
| 69 | String getHealthServerAuthUrl(); | 71 | String getHealthServerAuthUrl(); |
| 70 | 72 | ||
| 71 | /// Opens Huawei Health client authorization UI. Returns whether user granted. | 73 | /// Opens Huawei Health client authorization UI. Returns whether user granted. |
| @@ -76,58 +78,73 @@ abstract class HealthKitHostApi { | @@ -76,58 +78,73 @@ abstract class HealthKitHostApi { | ||
| 76 | /// Runs native health read and server upload pipeline. | 78 | /// Runs native health read and server upload pipeline. |
| 77 | HealthUploadResult performHealthUpload(); | 79 | HealthUploadResult performHealthUpload(); |
| 78 | 80 | ||
| 81 | +@async | ||
| 79 | List<HealthUploadDataPoint> fetchHrvData(int startTime, int endTime); | 82 | List<HealthUploadDataPoint> fetchHrvData(int startTime, int endTime); |
| 80 | 83 | ||
| 84 | +@async | ||
| 81 | List<HealthUploadDataPoint> fetchHeartRateData(int startTime, int endTime); | 85 | List<HealthUploadDataPoint> fetchHeartRateData(int startTime, int endTime); |
| 82 | 86 | ||
| 87 | +@async | ||
| 83 | List<HealthUploadDataPoint> fetchWalkingHeartRateData( | 88 | List<HealthUploadDataPoint> fetchWalkingHeartRateData( |
| 84 | int startTime, | 89 | int startTime, |
| 85 | int endTime, | 90 | int endTime, |
| 86 | ); | 91 | ); |
| 87 | 92 | ||
| 93 | +@async | ||
| 88 | List<HealthUploadDataPoint> fetchRestingHeartRateData( | 94 | List<HealthUploadDataPoint> fetchRestingHeartRateData( |
| 89 | int startTime, | 95 | int startTime, |
| 90 | int endTime, | 96 | int endTime, |
| 91 | ); | 97 | ); |
| 92 | 98 | ||
| 99 | +@async | ||
| 93 | List<HealthUploadDataPoint> fetchSleepingHeartRateData( | 100 | List<HealthUploadDataPoint> fetchSleepingHeartRateData( |
| 94 | int startTime, | 101 | int startTime, |
| 95 | int endTime, | 102 | int endTime, |
| 96 | ); | 103 | ); |
| 97 | 104 | ||
| 105 | +@async | ||
| 98 | List<HealthUploadDataPoint> fetchOxygenSaturationData( | 106 | List<HealthUploadDataPoint> fetchOxygenSaturationData( |
| 99 | int startTime, | 107 | int startTime, |
| 100 | int endTime, | 108 | int endTime, |
| 101 | ); | 109 | ); |
| 102 | 110 | ||
| 111 | +@async | ||
| 103 | List<HealthUploadDataPoint> fetchActiveEnergyData( | 112 | List<HealthUploadDataPoint> fetchActiveEnergyData( |
| 104 | int startTime, | 113 | int startTime, |
| 105 | int endTime, | 114 | int endTime, |
| 106 | ); | 115 | ); |
| 107 | 116 | ||
| 117 | +@async | ||
| 108 | List<HealthUploadDataPoint> fetchExerciseData(int startTime, int endTime); | 118 | List<HealthUploadDataPoint> fetchExerciseData(int startTime, int endTime); |
| 109 | 119 | ||
| 120 | +@async | ||
| 110 | List<HealthUploadDataPoint> fetchStandData(int startTime, int endTime); | 121 | List<HealthUploadDataPoint> fetchStandData(int startTime, int endTime); |
| 111 | 122 | ||
| 123 | +@async | ||
| 112 | List<HealthUploadDataPoint> fetchStepCountData(int startTime, int endTime); | 124 | List<HealthUploadDataPoint> fetchStepCountData(int startTime, int endTime); |
| 113 | 125 | ||
| 126 | +@async | ||
| 114 | List<HealthSleepUploadDataPoint> fetchSleepData(int startTime, int endTime); | 127 | List<HealthSleepUploadDataPoint> fetchSleepData(int startTime, int endTime); |
| 115 | 128 | ||
| 129 | +@async | ||
| 116 | List<HealthUploadDataPoint> fetchSleepingWristTemperatureData( | 130 | List<HealthUploadDataPoint> fetchSleepingWristTemperatureData( |
| 117 | int startTime, | 131 | int startTime, |
| 118 | int endTime, | 132 | int endTime, |
| 119 | ); | 133 | ); |
| 120 | 134 | ||
| 135 | +@async | ||
| 121 | List<HealthUploadDataPoint> fetchRespiratoryRateData( | 136 | List<HealthUploadDataPoint> fetchRespiratoryRateData( |
| 122 | int startTime, | 137 | int startTime, |
| 123 | int endTime, | 138 | int endTime, |
| 124 | ); | 139 | ); |
| 125 | 140 | ||
| 141 | +@async | ||
| 126 | List<HealthUploadDataPoint> fetchIrregularHeartRhythmData( | 142 | List<HealthUploadDataPoint> fetchIrregularHeartRhythmData( |
| 127 | int startTime, | 143 | int startTime, |
| 128 | int endTime, | 144 | int endTime, |
| 129 | ); | 145 | ); |
| 130 | 146 | ||
| 147 | +@async | ||
| 131 | HealthActivityTargetData? fetchActivityTargetData( | 148 | HealthActivityTargetData? fetchActivityTargetData( |
| 132 | int startTime, | 149 | int startTime, |
| 133 | int endTime, | 150 | int endTime, |
| @@ -133,10 +133,10 @@ packages: | @@ -133,10 +133,10 @@ packages: | ||
| 133 | dependency: transitive | 133 | dependency: transitive |
| 134 | description: | 134 | description: |
| 135 | name: characters | 135 | name: characters |
| 136 | - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" | 136 | + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 |
| 137 | url: "https://pub.dev" | 137 | url: "https://pub.dev" |
| 138 | source: hosted | 138 | source: hosted |
| 139 | - version: "1.3.0" | 139 | + version: "1.4.0" |
| 140 | checked_yaml: | 140 | checked_yaml: |
| 141 | dependency: transitive | 141 | dependency: transitive |
| 142 | description: | 142 | description: |
| @@ -149,10 +149,10 @@ packages: | @@ -149,10 +149,10 @@ packages: | ||
| 149 | dependency: transitive | 149 | dependency: transitive |
| 150 | description: | 150 | description: |
| 151 | name: clock | 151 | name: clock |
| 152 | - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf | 152 | + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b |
| 153 | url: "https://pub.dev" | 153 | url: "https://pub.dev" |
| 154 | source: hosted | 154 | source: hosted |
| 155 | - version: "1.1.1" | 155 | + version: "1.1.2" |
| 156 | code_builder: | 156 | code_builder: |
| 157 | dependency: transitive | 157 | dependency: transitive |
| 158 | description: | 158 | description: |
| @@ -165,10 +165,10 @@ packages: | @@ -165,10 +165,10 @@ packages: | ||
| 165 | dependency: transitive | 165 | dependency: transitive |
| 166 | description: | 166 | description: |
| 167 | name: collection | 167 | name: collection |
| 168 | - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf | 168 | + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" |
| 169 | url: "https://pub.dev" | 169 | url: "https://pub.dev" |
| 170 | source: hosted | 170 | source: hosted |
| 171 | - version: "1.19.0" | 171 | + version: "1.19.1" |
| 172 | convert: | 172 | convert: |
| 173 | dependency: transitive | 173 | dependency: transitive |
| 174 | description: | 174 | description: |
| @@ -237,10 +237,10 @@ packages: | @@ -237,10 +237,10 @@ packages: | ||
| 237 | dependency: transitive | 237 | dependency: transitive |
| 238 | description: | 238 | description: |
| 239 | name: fake_async | 239 | name: fake_async |
| 240 | - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" | 240 | + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" |
| 241 | url: "https://pub.dev" | 241 | url: "https://pub.dev" |
| 242 | source: hosted | 242 | source: hosted |
| 243 | - version: "1.3.1" | 243 | + version: "1.3.3" |
| 244 | ffi: | 244 | ffi: |
| 245 | dependency: transitive | 245 | dependency: transitive |
| 246 | description: | 246 | description: |
| @@ -426,7 +426,7 @@ packages: | @@ -426,7 +426,7 @@ packages: | ||
| 426 | dependency: transitive | 426 | dependency: transitive |
| 427 | description: | 427 | description: |
| 428 | path: image_cropper_for_web | 428 | path: image_cropper_for_web |
| 429 | - ref: "br_v9.1.0_ohos" | 429 | + ref: "65c2c99891882ea59732959a672f3d5993a837bb" |
| 430 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" | 430 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" |
| 431 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" | 431 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" |
| 432 | source: git | 432 | source: git |
| @@ -435,7 +435,7 @@ packages: | @@ -435,7 +435,7 @@ packages: | ||
| 435 | dependency: transitive | 435 | dependency: transitive |
| 436 | description: | 436 | description: |
| 437 | path: image_cropper_platform_interface | 437 | path: image_cropper_platform_interface |
| 438 | - ref: "br_v9.1.0_ohos" | 438 | + ref: "65c2c99891882ea59732959a672f3d5993a837bb" |
| 439 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" | 439 | resolved-ref: "65c2c99891882ea59732959a672f3d5993a837bb" |
| 440 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" | 440 | url: "https://gitcode.com/openharmony-sig/fluttertpc_image_cropper.git" |
| 441 | source: git | 441 | source: git |
| @@ -517,10 +517,10 @@ packages: | @@ -517,10 +517,10 @@ packages: | ||
| 517 | dependency: "direct main" | 517 | dependency: "direct main" |
| 518 | description: | 518 | description: |
| 519 | name: intl | 519 | name: intl |
| 520 | - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf | 520 | + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" |
| 521 | url: "https://pub.dev" | 521 | url: "https://pub.dev" |
| 522 | source: hosted | 522 | source: hosted |
| 523 | - version: "0.19.0" | 523 | + version: "0.20.2" |
| 524 | io: | 524 | io: |
| 525 | dependency: transitive | 525 | dependency: transitive |
| 526 | description: | 526 | description: |
| @@ -549,26 +549,26 @@ packages: | @@ -549,26 +549,26 @@ packages: | ||
| 549 | dependency: transitive | 549 | dependency: transitive |
| 550 | description: | 550 | description: |
| 551 | name: leak_tracker | 551 | name: leak_tracker |
| 552 | - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" | 552 | + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" |
| 553 | url: "https://pub.dev" | 553 | url: "https://pub.dev" |
| 554 | source: hosted | 554 | source: hosted |
| 555 | - version: "10.0.7" | 555 | + version: "11.0.2" |
| 556 | leak_tracker_flutter_testing: | 556 | leak_tracker_flutter_testing: |
| 557 | dependency: transitive | 557 | dependency: transitive |
| 558 | description: | 558 | description: |
| 559 | name: leak_tracker_flutter_testing | 559 | name: leak_tracker_flutter_testing |
| 560 | - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" | 560 | + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" |
| 561 | url: "https://pub.dev" | 561 | url: "https://pub.dev" |
| 562 | source: hosted | 562 | source: hosted |
| 563 | - version: "3.0.8" | 563 | + version: "3.0.10" |
| 564 | leak_tracker_testing: | 564 | leak_tracker_testing: |
| 565 | dependency: transitive | 565 | dependency: transitive |
| 566 | description: | 566 | description: |
| 567 | name: leak_tracker_testing | 567 | name: leak_tracker_testing |
| 568 | - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" | 568 | + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" |
| 569 | url: "https://pub.dev" | 569 | url: "https://pub.dev" |
| 570 | source: hosted | 570 | source: hosted |
| 571 | - version: "3.0.1" | 571 | + version: "3.0.2" |
| 572 | lints: | 572 | lints: |
| 573 | dependency: transitive | 573 | dependency: transitive |
| 574 | description: | 574 | description: |
| @@ -597,10 +597,10 @@ packages: | @@ -597,10 +597,10 @@ packages: | ||
| 597 | dependency: transitive | 597 | dependency: transitive |
| 598 | description: | 598 | description: |
| 599 | name: matcher | 599 | name: matcher |
| 600 | - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb | 600 | + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 |
| 601 | url: "https://pub.dev" | 601 | url: "https://pub.dev" |
| 602 | source: hosted | 602 | source: hosted |
| 603 | - version: "0.12.16+1" | 603 | + version: "0.12.17" |
| 604 | material_color_utilities: | 604 | material_color_utilities: |
| 605 | dependency: transitive | 605 | dependency: transitive |
| 606 | description: | 606 | description: |
| @@ -613,10 +613,10 @@ packages: | @@ -613,10 +613,10 @@ packages: | ||
| 613 | dependency: transitive | 613 | dependency: transitive |
| 614 | description: | 614 | description: |
| 615 | name: meta | 615 | name: meta |
| 616 | - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 | 616 | + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" |
| 617 | url: "https://pub.dev" | 617 | url: "https://pub.dev" |
| 618 | source: hosted | 618 | source: hosted |
| 619 | - version: "1.15.0" | 619 | + version: "1.17.0" |
| 620 | mime: | 620 | mime: |
| 621 | dependency: transitive | 621 | dependency: transitive |
| 622 | description: | 622 | description: |
| @@ -645,10 +645,10 @@ packages: | @@ -645,10 +645,10 @@ packages: | ||
| 645 | dependency: transitive | 645 | dependency: transitive |
| 646 | description: | 646 | description: |
| 647 | name: path | 647 | name: path |
| 648 | - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" | 648 | + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" |
| 649 | url: "https://pub.dev" | 649 | url: "https://pub.dev" |
| 650 | source: hosted | 650 | source: hosted |
| 651 | - version: "1.9.0" | 651 | + version: "1.9.1" |
| 652 | path_provider: | 652 | path_provider: |
| 653 | dependency: transitive | 653 | dependency: transitive |
| 654 | description: | 654 | description: |
| @@ -966,18 +966,18 @@ packages: | @@ -966,18 +966,18 @@ packages: | ||
| 966 | dependency: transitive | 966 | dependency: transitive |
| 967 | description: | 967 | description: |
| 968 | name: stack_trace | 968 | name: stack_trace |
| 969 | - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" | 969 | + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" |
| 970 | url: "https://pub.dev" | 970 | url: "https://pub.dev" |
| 971 | source: hosted | 971 | source: hosted |
| 972 | - version: "1.12.0" | 972 | + version: "1.12.1" |
| 973 | stream_channel: | 973 | stream_channel: |
| 974 | dependency: transitive | 974 | dependency: transitive |
| 975 | description: | 975 | description: |
| 976 | name: stream_channel | 976 | name: stream_channel |
| 977 | - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 | 977 | + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" |
| 978 | url: "https://pub.dev" | 978 | url: "https://pub.dev" |
| 979 | source: hosted | 979 | source: hosted |
| 980 | - version: "2.1.2" | 980 | + version: "2.1.4" |
| 981 | stream_transform: | 981 | stream_transform: |
| 982 | dependency: transitive | 982 | dependency: transitive |
| 983 | description: | 983 | description: |
| @@ -1006,10 +1006,10 @@ packages: | @@ -1006,10 +1006,10 @@ packages: | ||
| 1006 | dependency: "direct main" | 1006 | dependency: "direct main" |
| 1007 | description: | 1007 | description: |
| 1008 | name: table_calendar | 1008 | name: table_calendar |
| 1009 | - sha256: b2896b7c86adf3a4d9c911d860120fe3dbe03c85db43b22fd61f14ee78cdbb63 | 1009 | + sha256: "0c0c6219878b363a2d5f40c7afb159d845f253d061dc3c822aa0d5fe0f721982" |
| 1010 | url: "https://pub.dev" | 1010 | url: "https://pub.dev" |
| 1011 | source: hosted | 1011 | source: hosted |
| 1012 | - version: "3.1.3" | 1012 | + version: "3.2.0" |
| 1013 | term_glyph: | 1013 | term_glyph: |
| 1014 | dependency: transitive | 1014 | dependency: transitive |
| 1015 | description: | 1015 | description: |
| @@ -1022,10 +1022,10 @@ packages: | @@ -1022,10 +1022,10 @@ packages: | ||
| 1022 | dependency: transitive | 1022 | dependency: transitive |
| 1023 | description: | 1023 | description: |
| 1024 | name: test_api | 1024 | name: test_api |
| 1025 | - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" | 1025 | + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 |
| 1026 | url: "https://pub.dev" | 1026 | url: "https://pub.dev" |
| 1027 | source: hosted | 1027 | source: hosted |
| 1028 | - version: "0.7.3" | 1028 | + version: "0.7.7" |
| 1029 | timing: | 1029 | timing: |
| 1030 | dependency: transitive | 1030 | dependency: transitive |
| 1031 | description: | 1031 | description: |
| @@ -1054,10 +1054,10 @@ packages: | @@ -1054,10 +1054,10 @@ packages: | ||
| 1054 | dependency: transitive | 1054 | dependency: transitive |
| 1055 | description: | 1055 | description: |
| 1056 | name: vector_math | 1056 | name: vector_math |
| 1057 | - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" | 1057 | + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b |
| 1058 | url: "https://pub.dev" | 1058 | url: "https://pub.dev" |
| 1059 | source: hosted | 1059 | source: hosted |
| 1060 | - version: "2.1.4" | 1060 | + version: "2.2.0" |
| 1061 | vm_service: | 1061 | vm_service: |
| 1062 | dependency: transitive | 1062 | dependency: transitive |
| 1063 | description: | 1063 | description: |
| @@ -1111,8 +1111,8 @@ packages: | @@ -1111,8 +1111,8 @@ packages: | ||
| 1111 | dependency: transitive | 1111 | dependency: transitive |
| 1112 | description: | 1112 | description: |
| 1113 | path: "packages/webview_flutter/webview_flutter_android" | 1113 | path: "packages/webview_flutter/webview_flutter_android" |
| 1114 | - ref: "br_webview_flutter-v4.13.0_ohos" | ||
| 1115 | - resolved-ref: cd84e4ca392f666bc728c32c49fb328127058826 | 1114 | + ref: de942e79c9057b32ad31106508bd87c0d60aef83 |
| 1115 | + resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1116 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1116 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1117 | source: git | 1117 | source: git |
| 1118 | version: "4.7.0" | 1118 | version: "4.7.0" |
| @@ -1120,8 +1120,8 @@ packages: | @@ -1120,8 +1120,8 @@ packages: | ||
| 1120 | dependency: transitive | 1120 | dependency: transitive |
| 1121 | description: | 1121 | description: |
| 1122 | path: "packages/webview_flutter/webview_flutter_ohos" | 1122 | path: "packages/webview_flutter/webview_flutter_ohos" |
| 1123 | - ref: "br_webview_flutter-v4.13.0_ohos" | ||
| 1124 | - resolved-ref: cd84e4ca392f666bc728c32c49fb328127058826 | 1123 | + ref: de942e79c9057b32ad31106508bd87c0d60aef83 |
| 1124 | + resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1125 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1125 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1126 | source: git | 1126 | source: git |
| 1127 | version: "4.7.0" | 1127 | version: "4.7.0" |
| @@ -1129,8 +1129,8 @@ packages: | @@ -1129,8 +1129,8 @@ packages: | ||
| 1129 | dependency: transitive | 1129 | dependency: transitive |
| 1130 | description: | 1130 | description: |
| 1131 | path: "packages/webview_flutter/webview_flutter_platform_interface" | 1131 | path: "packages/webview_flutter/webview_flutter_platform_interface" |
| 1132 | - ref: "br_webview_flutter-v4.13.0_ohos" | ||
| 1133 | - resolved-ref: cd84e4ca392f666bc728c32c49fb328127058826 | 1132 | + ref: de942e79c9057b32ad31106508bd87c0d60aef83 |
| 1133 | + resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1134 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1134 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1135 | source: git | 1135 | source: git |
| 1136 | version: "2.13.1" | 1136 | version: "2.13.1" |
| @@ -1138,8 +1138,8 @@ packages: | @@ -1138,8 +1138,8 @@ packages: | ||
| 1138 | dependency: transitive | 1138 | dependency: transitive |
| 1139 | description: | 1139 | description: |
| 1140 | path: "packages/webview_flutter/webview_flutter_wkwebview" | 1140 | path: "packages/webview_flutter/webview_flutter_wkwebview" |
| 1141 | - ref: "br_webview_flutter-v4.13.0_ohos" | ||
| 1142 | - resolved-ref: cd84e4ca392f666bc728c32c49fb328127058826 | 1141 | + ref: de942e79c9057b32ad31106508bd87c0d60aef83 |
| 1142 | + resolved-ref: de942e79c9057b32ad31106508bd87c0d60aef83 | ||
| 1143 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" | 1143 | url: "https://gitcode.com/openharmony-tpc/flutter_packages.git" |
| 1144 | source: git | 1144 | source: git |
| 1145 | version: "3.22.0" | 1145 | version: "3.22.0" |
| @@ -1160,5 +1160,5 @@ packages: | @@ -1160,5 +1160,5 @@ packages: | ||
| 1160 | source: hosted | 1160 | source: hosted |
| 1161 | version: "3.1.3" | 1161 | version: "3.1.3" |
| 1162 | sdks: | 1162 | sdks: |
| 1163 | - dart: ">=3.6.2 <4.0.0" | 1163 | + dart: ">=3.8.0-0 <4.0.0" |
| 1164 | flutter: ">=3.27.0" | 1164 | flutter: ">=3.27.0" |
-
Please register or login to post a comment