Skip to content

[Question]: Distinguish between real '0' and no-data '0' #1733

@Priyantha-Kingslake

Description

@Priyantha-Kingslake

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Your question

The following is extracted from within package implementation

/// The speed at which the devices is traveling in meters per second over
  /// ground.
  ///
  /// The speed is not available on all devices. In these cases the value is
  /// 0.0.
  final double speed;

  /// The estimated speed accuracy of this position, in meters per second.
  ///
  /// The speedAccuracy is not available on all devices. In these cases the
  /// value is 0.0.
  final double speedAccuracy;

according to this we get 0when there is no data. How do we distinguish whether this 0 means no-data or real 0?

Could no-data be changed to return null? Or expose getters to identify the value between real and not-found.

Version

14.0.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions