writeActivity method

Future<bool> writeActivity({
  1. required GoogleHealthActivityType activityType,
  2. required DateTime start,
  3. required DateTime end,
  4. int? calories,
  5. int? distance,
})

Implementation

Future<bool> writeActivity({
  required GoogleHealthActivityType activityType,
  required DateTime start,
  required DateTime end,
  int? calories,
  int? distance,
}) {
  return health.writeWorkoutData(
    activityType: _getWorkoutFromVivantaActivity(activityType),
    start: start,
    end: end,
    totalEnergyBurned: calories,
    totalDistance: distance,
  );
}