PointParser class Null safety

Parses a the List

The object maintains an internal state with all information that's been parsed so far. If then information is sent that seems to indicates a new point definition, the parser makes a choice:

  • if the current state is sufficient to define a point, a point is created and returned
  • otherwise it assumes that the previously provided information was not in fact a correct point. The parser resets its internal state and starts working on a new point. No point is returned.

Constructors

PointParser(double? _minSecondsBetweenDatapoints, double? _accuracyThreshold, void resultReporter(GpsPoint point))

Properties

accuracy int?
read / write
altitude int?
read / write
hashCode int
The hash code for this object.
read-onlyinherited
isAllNull bool
read-only
isUndefined bool
Points are defined if the minimum required information is provided (timestamp, latitude and longitude).
read-only
latitudeE7 int?
read / write
longitudeE7 int?
read / write
pos int
Current position of the parser in the bytes list.
read / write
posStartNextStreamChunk int?
Position up to which we've successfully parsed. This is where we should continue parsing with the next chunk of data from a stream, if the current chunk contained incomplete data to define a point.
read / write
resultReporter → void Function(GpsPoint point)
Function called when a point has been identified (typically a Sink.add accepting the points).
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
timestampMs int?
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
parseUpdate(List<int> bytes, int start, int end) → void
Tries to update its fields based on information from the specified bytes, which should come from a JSON file. Creates and sends new points to resultReporter when such fully defined points are detected.
reset() → void
Resets the internal parser state to completely null.
toGpsPointAndReset() → void
Creates and adds a point representing the current internal state to resultReporter, if the current state is sufficiently defined to represent such a point. The internal state is consequently reset, whether a point was created or not.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited