1

I'am building a simple pedometer application using flutter using pedometer package. When I start the application it start constanly counting steps. I want to have a button to start and pause the counting (thinking about putting a timer later for how many steps in a hour)

I'am so new in in flutter this i the link to the package https://pub.dev/packages/pedometer And I'am using there example code : https://github.com/cph-cachet/flutter-plugins/blob/master/packages/pedometer/example/lib/main.dart

I want to have a button to start and pause the counting

1 Answers1

0

You have to keep track of the count yourself and remember the count when the user pressed reset like 11230 equals 0 and subtract that offset. Basically, Flutter doesn't have a way to reset the pedometer data as the app is listening to the sensor data through a stream. This answer is from google search