vital_health 0.7.0 copy "vital_health: ^0.7.0" to clipboard
vital_health: ^0.7.0 copied to clipboard

The Vital Health package allowing fitness apps linking with tryvital.io and with support for HealthKit.

vital_health #

pub package

Introduction #

The Vital SDK is split into three main components: vital_core, vital_health and vital_devices.

  • vital_core holds common components to both vital_health and vital_devices. Among other things, it has the network layer that allows us to send data from a device to a server.
  • vital_health is an abstraction over HealthKit an Health Connect(coming soon)
  • vital_devices is an abstraction over a set of Bluetooth devices.

Getting Started #

  1. Follow iOS SDK instructions regarding HealthKit capabilities and background delivery setup for your iOS app.

  2. To use HealthKit client you need to call configure first:

await client.healthkitServices.configureClient();
await client.healthkitServices.configureHealthkit(backgroundDeliveryEnabled: true);
  1. Set User ID
client.healthkitServices.setUserId('eba7c0a2-dc01-49f5-a361-...);
  1. Ask user for permissions to collect HealthKit data.
client.healthkitServices.askForResources(
  [
    HealthkitResource.profile,
    HealthkitResource.body,
    ...
  ]
);
  1. Sync data
client.healthkitServices.syncData();
  1. Observe sync status using status stream
Stream<SyncStatus> status = client.healthkitServices.status
  1. When your user logs out you need to call cleanup on the health service
client.healthkitServices.cleanUp();

Documentation #

For more example usage run the sample app with your API key and Region set in main.dart. Please refer to the official Vital docs provide a full reference on using this library.

License #

vital-flutter is available under the AGPLv3 license. See the LICENSE file for more info. VitalDevices is under the Adept Labs Enterprise Edition (EE) license (the “EE License”). Please refer to its license inside its folder.

1
likes
100
pub points
75%
popularity

Publisher

verified publishertryvital.io

The Vital Health package allowing fitness apps linking with tryvital.io and with support for HealthKit.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

fimber, flutter, json_annotation, vital_core, vital_health_android, vital_health_ios, vital_health_platform_interface

More

Packages that depend on vital_health