The Flutter Health Plugin is a cross-platform solution for accessing health and fitness data in your Flutter apps. It provides a unified API that works seamlessly with:

Apple HealthKit

Access health data on iOS devices through Apple’s native HealthKit framework

Google Health Connect

Read and write health data on Android using Google Health Connect

What Can You Build?

Fitness Apps

Track workouts, steps, calories, and activity levels

Health Monitoring

Monitor vital signs like heart rate, blood pressure, and oxygen levels

Wellness Apps

Track sleep, mindfulness, water intake, and daily activities

Medical Apps

Record blood glucose, medications, symptoms, and health measurements

Features

  • Reading Data
  • Writing Data
  • Permissions
Flexible Data Queries
  • Read individual data points
  • Get time-bucketed aggregates (hourly, daily, weekly)
  • Fetch workout summaries
  • Calculate step totals
// Get last 24 hours of step data
final data = await health.getHealthDataFromTypes(
  types: [HealthDataType.STEPS],
  startDate: yesterday,
  endDate: now,
);

Requirements

Minimum Versions
  • iOS 13.0 or higher
  • Android with Health Connect (Android API level 26+)

How It Works

1

Setup Your Project

Add the plugin to your pubspec.yaml and configure platform-specific settingsGo to Installation →
2

Request Permissions

Ask users for permission to access specific health data typesLearn about Permissions →
3

Read or Write Data

Use the Health API to read existing data or write new measurementsReading Guide → | Writing Guide →

Quick Example

Here’s a complete example to get you started:
import 'package:health/health.dart';

// 1. Create Health instance
final health = Health();
await health.configure();

// 2. Request permissions
final types = [HealthDataType.STEPS];
final granted = await health.requestAuthorization(types);

if (granted) {
  // 3. Read today's steps
  final now = DateTime.now();
  final midnight = DateTime(now.year, now.month, now.day);
  final steps = await health.getTotalStepsInInterval(midnight, now);
  
  print('Steps today: ${steps ?? 0}');
}

Try the Full Example

Follow our quickstart guide for a step-by-step tutorial with more features

Supported Data

The plugin supports over 100 health data types including:

Activity

Steps, distance, calories, workouts, flights climbed

Body Measurements

Weight, height, BMI, body fat %, lean mass

Vital Signs

Heart rate, blood pressure, blood oxygen, temperature

Nutrition

Meals, water, calories, macros, micronutrients

Sleep

Sleep stages, in bed time, asleep time, REM, deep sleep

Reproductive

Menstruation flow, cycle tracking
See all data types →

Platform Setup

Before using the plugin, you need to configure each platform:

Next Steps


Need Help? Check out the example app for a complete working implementation with UI.