DexcomStreamProvider class

Class that provides a stream that you can listen to. This will automatically fetch new readings when the old readings have hit the interval (defaults to 300 seconds).

Constructors

DexcomStreamProvider(Dexcom object, {Duration buffer = const Duration(seconds: 10), int maxCount = 2, bool? debug})
Requires an object (which is a Dexcom object) for listening to.

Properties

buffer Duration
Buffer that is added onto interval to give the client's Dexcom time to upload readings. This can help prevent skipping over a reading.
final
debug bool
Debug mode (default is set to object's setting).
no setter
hashCode int
The hash code for this object.
no setterinherited
maxCount int
How many pieces of data should be sent with each new incoming data. This is recommended to be a low number.
final
minimumRefreshInterval int
How long at least we should wait in between refresh attempts. This is measured in milliseconds.
final
object Dexcom
The Dexcom object that is listened to.
final
paused bool
To pause the listener(s).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<List>?
Stream that can be listened to for new Dexcom readings.
no setter
time int
Timer for the listener.
getter/setter pair
toWaitOnTooManyRequestsReceived int
How long we should wait before requesting again if we get rate-limited. This is measured in milliseconds.
final

Methods

close() → void
Close the stream listening to the Dexcom readings.
listen({void onData(List<DexcomReading> data)?, void onError(Object error)?, void onTimerChange(int time)?, void onRefresh()?, void onRefreshEnd(Duration timeTaken)?, bool cancelOnError = false}) → void
Start listening to incoming Dexcom readings. Make sure to call close when done listening to free up resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Pause all listeners. The timers will still be active; call close to stop them.
refresh() → void
Trigger the listener to fetch new data.
toString() String
Converts the current DexcomStreamProvider object to a string.
override
unpause() → void
Unpause all listeners.

Operators

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