vital_core
A Flutter plugin for Vital Core.
Getting Started
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
andvital_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.
Usage
To run JSON code generation:
dart run build_runner build
Initialise client with region, environment and api key
final client = VitalClient()
..init(region: Region.eu, environment: Environment.sandbox, apiKey: 'sk_eu_...');
Query users:
final Response<List<User>> usersResponse = client.userService.getAll();
Link data provider:
client.linkProvider(user, 'strava','vitalexample: //callback');
Note: To return back to the app after successful linking, setup an intent filter in
AndroidManifest.xml
and custom URL scheme ininfo.plist
. Note 2: Refer to documentation for all supported data providers.
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.
Libraries
- client_status
- core
- environment
- exceptions
- provider
- region
- samples
- services/activity_service
- services/body_service
- services/data/activity
- services/data/body
- services/data/link
- services/data/profile
- services/data/sleep
- services/data/testkits
- services/data/user
- services/data/vitals
- services/data/workout
- services/link_service
- services/profile_service
- services/sleep_service
- services/testkits_service
- services/user_service
- services/utils/http_logging_interceptor
- services/utils/json_serializable_converter
- services/utils/vital_interceptor
- services/vitals_service
- services/workout_service
- vital_core