sfit_step_counter 0.0.8
sfit_step_counter: ^0.0.8 copied to clipboard
Step Counter is a lightweight Flutter package that detects steps in real-time using the accelerometer via sensors_plus.
Step Counter #
A light weight package to help you count steps on your app using gyrometer and Kalmans algorithm, i made this as a improvement to health and pedometer after i discovered they were being discontinued or crashing on some phones. Thank you for downloading and enjoy coding 😊.
Usage Example in your app:
final stepCounter = StepCounter();
await stepCounter.init(weightKg: 68, heightMeters: 1.72);
stepCounter.start();
stepCounter.stepStream.listen((steps) { print('Steps: $steps'); print('Calories: ${stepCounter.caloriesBurned.toStringAsFixed(2)} kcal'); print('Speed: ${stepCounter.walkingSpeedKmh.toStringAsFixed(2)} km/h'); });
import 'package:permission_handler/permission_handler.dart';
Future
Import it #
Features #
-
Step detection using
sensors_plus -
Live step count stream
-
Easy-to-use API:
start(),stop(),reset() -
defaultConfig { minSdkVersion 21 // other configs... }
Getting Started #
Add this to your pubspec.yaml:
dependencies:
step_counter: ^0.0.8