MyHkReader class

Constructors

MyHkReader()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getPlatformVersion() Future<String>
hasPermissions(List<DataType> types) Future<bool>
iOS isn't completely supported by HealthKit, false means no, true means user has approved or declined permissions. In case user has declined permissions read will just return empty list for declined data types.
isSameDay(DateTime date1, DateTime date2) bool
makeDateRange(DateTime date) List<DateTime>
makeTargetDates(DateTime from, DateTime to) List<DateTime>
read(DataType type, {required DateTime dateFrom, required DateTime dateTo, int? limit}) Future<List<FitData>>
It's not advised to call await FitKit.read(dataType) without any extra parameters. This can lead to FAILED BINDER TRANSACTION on Android devices because of the data batch size being too large.
readDistances(DataType type, {required DateTime dateFrom, required DateTime dateTo}) Future<List>
readSpecifiedDateDistances(DataType type, DateTime dateFrom, DateTime dateTo) Future<List>
readSpecifiedDateSteps(DataType type, DateTime dateFrom, DateTime dateTo) Future<List>
readSteps(DataType type, {required DateTime dateFrom, required DateTime dateTo}) Future<List>
requestPermissions(List<DataType> types) Future<bool>
If you're using more than one DataType it's advised to call requestPermissions with all the data types once, otherwise iOS HealthKit will ask to approve every permission one by one in separate screens.
revokePermissions() Future<void>
iOS isn't supported by HealthKit, method does nothing.