Baseflow / Baseflow/flutter-permission-handler

[Feature request]: use `null` in `Position` class variables to differentiate (un)available values

Open
#1,287 1 comment 0 reactions 1 assignee Claimed by @TimHoogstrate View on GitHub
P2 refactor type: enhancement
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

### Is there already an issue requesting this feature?

- [X] I have searched the [existing issues](https://github.com/baseflow/flutter-permission-handler/issues).

### Please select affected platform(s)

- [X] Android
- [X] iOS
- [X] Windows

### Use case

According to the comments of `geolocator_platform_interface-4.2.2`, the `altitude`, `altitudeAccuracy`, `accuracy`, `heading`, `headingAccuracy`, `speed`, `speedAccuracy` variables may not be available, in which case the value will be 0.

The problem is users cannot differentiate unavailable values from actual readings of 0's for those variables.

### Proposal

Make all the above variables nullable, and use `null` as the value if the variable is unavailable. This is already implemented for the variable `floor`.

### Specific requirements or considerations

_No response_

### Additional information or context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.