问题描述
我在记录步骤的 Flutter 应用程序上使用 fit_kit 插件。 到目前为止,我可以使用以下方法获取步骤:
final Now = DateTime.Now();
final results = await FitKit.read(
DataType.STEP_COUNT,dateFrom: DateTime(Now.year,Now.month,Now.day),dateto: DateTime.Now(),);
int steps = 0;
results.forEach((element) {
steps += element.value;
});
print(steps);
但我想实现一个功能,当用户走路或跑步时,它会记录步数。我可以使用 fit kit 插件设置某种流吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)