How to Build a Health & Fitness App with Real Features in Flutter?
[With Code + GitHub]

By Atit Purani

September 3, 2025

The demand for health & fitness apps is at an all-time high.

From step tracking and pedometer apps to workout logging, calorie tracking, and sleep monitoring, users want everything in one place.

If you are trying to build a Flutter health app with real features, then these functionalities help you stand out in this growing market.

So, why choose Flutter for fitness apps?

  • Cross-platform: Build once, run on both Android and iOS without extra effort.
  • Fast UI & Performance: Flutter delivers smooth animations, perfect for workout tracker apps, BMI calculators, and nutrition trackers.
  • Plugin ecosystem: With packages like flutter_health_connect, pedometer, and health, you can easily integrate Health Connect (Android) and Apple HealthKit (iOS).

By the end of this blog, you’ll have a working Flutter Fitness App with GitHub code that includes real-world features like step counting, calorie tracking, & sleep visualization.

What Are the Real Features Every Flutter Fitness App Should Have?

Flutter-Fitness-App-Should

A modern fitness tracking app in Flutter should go beyond counting steps. Here are some must-have features to make your app engaging and competitive:

  • Step Counter & Pedometer Tracking: Use flutter_health_connect or pedometer to fetch daily step counts and walking distance.
  • Workout & Activity Logging: Allow users to log workouts, track gym routines, or monitor outdoor runs.
  • Calories & Nutrition Tracker: Help users track meals, calculate calorie intake, and monitor nutrition.
  • Water Reminder: Push notifications to keep users hydrated throughout the day.
  • Sleep Tracking Visualization: Show sleep patterns and insights using charts.
  • Heart Rate Monitoring (via wearables): Sync with WearOS and Apple Watch for real-time health insights.
  • BMI Calculator Integration: A simple yet valuable tool for fitness tracking apps.
  • Sync Across Devices (Health Connect + HealthKit): Ensure smooth data sync on Android & iOS.

With these features, your Flutter fitness app will not just be another pedometer; it’ll be a complete health companion.

Project Setup: Getting Started with Flutter Fitness App

Getting-Started-with-Flutter-Fitness-App

Before we start coding, let’s set up the project.

1. Install Flutter SDK

Make sure you have Flutter SDK installed and configured with Android Studio or VS Code.

2. Create a New Flutter Project

flutter create flutter_fitness_app

cd flutter_fitness_app

3. Add Essential Dependencies

In your pubspec.yaml, add:

dependencies:
flutter:
sdk: flutter
flutter_health_connect: ^1.0.0
pedometer: ^3.0.0
health: ^5.0.0

These plugins allow you to integrate step counter apps, calorie tracking, and Health Connect / HealthKit data.

4. Choose a State Management Solution

For handling health data effectively, use Provider, Riverpod, or Bloc.

These help in managing background step tracking, workout logs, and calorie data without clutter.

Step Counter in Flutter (Health Connect + HealthKit)

A Flutter step counter app with GitHub code is one of the most requested features in health apps. Let’s see how to integrate it.

  • Health Connect (Android) Integration

Google is migrating from Google Fit to Health Connect, so we’ll use the flutter_health_connect plugin.

        
          import 'package:flutter/material.dart';
          import 'package:flutter_health_connect/flutter_health_connect.dart';
          
          class StepCounterPage extends StatefulWidget {
            @override
            _StepCounterPageState createState() => _StepCounterPageState();
          }
          
          class _StepCounterPageState extends State <StepCounterPage> {
            int steps = 0;
          
            Future fetchSteps() async {
            final healthConnect = FlutterHealthConnect();
            final isAvailable = await healthConnect.isApiAvailable();
          
            if (isAvailable) {
              final todaySteps = await healthConnect.readSteps(
                startTime: DateTime.now().subtract(Duration(days: 1)),
                endTime: DateTime.now(),
              );
              setState(() => steps = todaySteps);
            }
            }
          
            @override
            void initState() {
            super.initState();
            fetchSteps();
            }
          
            @override
            Widget build(BuildContext context) {
            return Scaffold(
              appBar: AppBar(title: Text("Step Counter")),
              body: Center(child: Text("Steps Today: $steps")),
            );
            }
          }
        
    

  • Apple HealthKit (iOS) Integration
        
          For iOS, we’ll use the health plugin to fetch steps:
      	    import 'package:health/health.dart';
 
          Future <int> fetchiOSSteps() async {
            final health = HealthFactory();
            final types = [HealthDataType.STEPS];
          
            bool requested = await health.requestAuthorization(types);
            if (requested) {
            final now = DateTime.now();
            final yesterday = now.subtract(Duration(days: 1));
            List<HealthDataPoint> steps =
                await health.getHealthDataFromTypes(yesterday, now, types);
          
            return steps.fold(0, (sum, e) => sum + (e.value as num).toInt());
            }
            return 0;
          }

        
        

Calories & Nutrition Tracker in Flutter

A calories & nutrition tracker is the next big feature after step counting.

  • Fetching Calories from Health Connect
        
          You can fetch calorie data like this:
      	    final calories = await healthConnect.readCalories(
                startTime: DateTime.now().subtract(Duration(days: 1)),
                endTime: DateTime.now(),
              );
              print("Calories burned: $calories");
        
        
  • Logging Daily Meals (Manual Input)
        
          class MealLog {
            final String meal;
            final int calories;
          
            MealLog(this.meal, this.calories);
          }
          
          List<MealLog> mealLogs = [
            MealLog("Breakfast", 350),
            MealLog("Lunch", 600),
          ];

        
        
  • Visualizing Calories with Charts (fl_chart)
        
          PieChart(
            PieChartData(
            sections: mealLogs.map((meal) {
              return PieChartSectionData(
                title: "${meal.meal} (${meal.calories})",
                value: meal.calories.toDouble(),
              );
            }).toList(),
            ),
          )
        
        

Sleep & Heart Rate Tracking Features

Sleep and heart rate are premium features in fitness apps.

  • Accessing Sleep Data (Android + iOS)
        
          final sleepData = await healthConnect.readSleepData(
              startTime: DateTime.now().subtract(Duration(days: 7)),
              endTime: DateTime.now(),
            );
            print("Sleep entries: $sleepData");
                    On iOS (HealthKit):
            final sleep = await health.getHealthDataFromTypes(
              DateTime.now().subtract(Duration(days: 7)),
              DateTime.now(),
              [HealthDataType.SLEEP_ASLEEP],
            );
        
        
  • Reading Heart Rate from Wearables
        
         final heartRate = await healthConnect.readHeartRate(
            startTime: DateTime.now().subtract(Duration(hours: 1)),
            endTime: DateTime.now(),
          );
          print("Heart Rate: $heartRate bpm");
        
        
  • Best Practices

Request permissions upfront.

Show users why you need health data.

Comply with Google Play and App Store policies for sensitive health data.

Adding Simple but Engaging Features

Small features make users come back daily.

  • Water Reminder Notifications
        
         import 'package:flutter_local_notifications/flutter_local_notifications.dart';
 
            final notifications = FlutterLocalNotificationsPlugin();
            notifications.show(
              0,
              "Time to Hydrate 💧",
              "Drink a glass of water!",
              NotificationDetails(
              android: AndroidNotificationDetails("water_reminder", "Reminders"),
              ),
            );

        
        
  • BMI Calculator
        
         double calculateBMI(double weight, double height) {
            return weight / (height * height);
          }
        
        

Syncing Health Data Across Devices

A good fitness app should work seamlessly across devices.

  • Background Services for Continuous Tracking

Use WorkManager or flutter_background_service for step sync.

  • Save Data Locally & Sync When Online
        
         class HealthEntry {
            final String type;
            final double value;
            final DateTime timestamp;
            HealthEntry(this.type, this.value, this.timestamp);
          }
          
          List<HealthEntry> offlineData = [];

        
        

Go Through the Complete Code to Build a Health & Fitness App in Flutter.

From Step Counter to Full Fitness App: Seven Square Builds It All

Building a successful health & fitness app in Flutter needs the right experience, strategy, and quality execution.

We have helped developers, entrepreneurs, and businesses create Flutter fitness apps with real features and smooth Health Connect + HealthKit integration.

  • We build step counter apps, workout trackers, calorie trackers, and sleep monitoring apps using Flutter with smooth UI and strong performance.
  • Our team ensures your app works with both Android Health Connect and Apple HealthKit, so your users enjoy cross-device sync.
  • From pedometer tracking to nutrition logging, heart rate monitoring, and BMI calculators, we deliver complete fitness tracking solutions in Flutter.
  • We follow privacy, permissions, and compliance best practices so your app gets approved without hassle.

You get a technology partner who understands how to create real-world health & fitness apps that attract users and deliver results.

Want a Health & Fitness App? Contact Us Now!

Your First Flutter Health & Fitness App is Ready

Now you have learned how to build a Flutter health & fitness app with real features like step counting, calories tracking, sleep monitoring, and heart rate integration.

  • Go through a working project with GitHub code.
  • Your app integrates with Health Connect and HealthKit, making it future-ready.

Start customizing your own Flutter workout tracker or fitness app.

FAQs

  • Yes, Flutter apps can integrate with Health Connect to fetch steps, calories, sleep, and heart rate data using the flutter_health_connect plugin.

  • Use the health plugin to request HealthKit permissions and fetch steps, workouts, and nutrition data on iOS devices.

  • Yes, Flutter is cross-platform, fast, and has a strong plugin ecosystem for building apps like step counters, workout trackers, and nutrition apps.

  • You can use Health Connect (Android) and HealthKit (iOS) APIs to fetch sleep patterns, then visualize them with charts in Flutter.

  • Yes, Flutter can connect with WearOS and Apple Watch to track heart rate via Health Connect and HealthKit integrations.

Get in Touch

Got a project idea? Let's discuss it over a cup of coffee.

    Get in Touch

    Got a project idea? Let's discuss it over a cup of coffee.

      COLLABORATION

      Got a project? Let’s talk.

      We’re a team of creative tech-enthus who are always ready to help business to unlock their digital potential. Contact us for more information.