StepsCount class

A Flutter plugin for counting steps and managing background step tracking services.

This class provides methods to:

  • Start and stop background step counting services
  • Retrieve step counts for specific date ranges
  • Get detailed timeline data with timestamps
  • Check service status

Constructors

StepsCount()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkHealthKitPermissionStatus({required List<HealthDataType> dataTypes}) Future<Map<String, bool>>
Checks the permission status for multiple health data types.
checkSingleHealthKitPermissionStatus({required HealthDataType dataType}) Future<bool>
Checks the permission status for a single health data type.
getStepCounts({DateTime? startDate, DateTime? endDate}) Future<int>
Gets the total step count for a specified date range.
getTimeline({DateTime? startDate, DateTime? endDate, TimeZoneType timeZone = TimeZoneType.local}) Future<List<TimelineModel>>
Gets detailed timeline data with step counts and timestamps.
getTodaysCount() Future<int>
Gets the step count for today (current date).
isHealthKitAvailable() Future<bool>
Checks if HealthKit is available on the device.
isServiceRunning() Future<bool>
Checks if the background step counting service is currently running.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestHealthKitPermissions({required List<HealthDataType> dataTypes}) Future<bool>
Requests HealthKit permissions for the specified health data types.
startBackgroundService() Future<void>
Starts the background step counting service.
stopBackgroundService() Future<void>
Stops the background step counting service.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited