writeActivity method
Future<bool>
writeActivity({
- required AppleHealthActivityType activityType,
- required DateTime start,
- required DateTime end,
- int? calories,
- int? distance,
Implementation
Future<bool> writeActivity({
required AppleHealthActivityType activityType,
required DateTime start,
required DateTime end,
int? calories,
int? distance,
}) {
return health.writeWorkoutData(
activityType: _getWorkoutFromActivity(activityType),
start: start,
end: end,
totalEnergyBurned: calories,
totalDistance: distance,
);
}