health_forge_ghc 0.1.1 copy "health_forge_ghc: ^0.1.1" to clipboard
health_forge_ghc: ^0.1.1 copied to clipboard

Google Health Connect adapter for health_forge — reads 14 health metric types from Health Connect and maps them to the unified health_forge data model.

example/example.dart

// Examples print to stdout for demonstration purposes only.
// ignore_for_file: avoid_print

import 'package:health_forge_ghc/health_forge_ghc.dart';

/// Constructs a Google Health Connect provider and lists its supported metrics.
///
/// Add the required Health Connect read permissions to
/// `android/app/src/main/AndroidManifest.xml` before authorizing in your
/// app code.
void main() {
  final provider = GhcHealthProvider();
  final metrics = provider.capabilities.supportedMetrics;

  print('${provider.displayName} supports ${metrics.length} metric type(s):');
  for (final metric in metrics.keys) {
    print('  - ${metric.name}');
  }
}
0
likes
160
points
215
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Google Health Connect adapter for health_forge — reads 14 health metric types from Health Connect and maps them to the unified health_forge data model.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#health #health-connect #android #wearables #google

License

MIT (license)

Dependencies

flutter, health, health_forge_core

More

Packages that depend on health_forge_ghc