carp-dk / carp-dk/flutter-plugins

[Pedometer 4.0.1] Handle stream error on Platform.android

Open
#808 0 comments 0 reactions 1 assignee Claimed by @hoffmatteo View on GitHub
bugfix
Dominant language
Dart
Stars
608
Forks
735
Avg merge
1m
Merged PRs (30d)
3

Description

**Remember to specify the plugin name in the title!**

### Device / Emulator and OS
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
- Device: Samsung J7 Prime
- OS: android 8

### Describe the bug
I read your code on how ```Pedometer.pedestrianStatusStream``` return stream on Android, and see that ```_androidPedestrianStreamController``` currently does not handle incoming error.
Current version:
image

### To Reproduce
Using device with no StepDetection to test steam error handling.

### Expected behavior
Should add addError to ```_androidPesdetrianStreamController``` so that it can be handle when create streamSubscription with Pedometer.pedestrianStream.listen().onError((e) {})
image

### Actual behavior
Error being log as UnhandledException and ```Pedometer.pedestrianStatusStream.listen().onError((e) {})``` can not catch this error.
image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.