dexcom 0.0.1 dexcom: ^0.0.1 copied to clipboard
dexcom for Flutter allows you to use Dexcom Share to get your Dexcom CGM data, or anybody else's, to run your application. Includes time (in milliseconds since Enoch), reading, and trend. Use your ema [...]
dexcom for Flutter allows you to use Dexcom Share to get your Dexcom CGM data, or anybody else's, to run your application. Includes time (in milliseconds since Enoch), reading, and trend. Use your email and password to have access to all your glucose data!
Features #
Very simple to use.
Usage #
Authentication:
String username = "username";
String password = "password";
var dexcom = Dexcom(username, password);
List<dynamic>? response;
try {
await dexcom.createSession();
print("Created session with dexcom: $dexcom");
} catch (e) {
print("Session creation error: $e");
}
This creates a dexcom instance and gets the session ID. You can now get readings.
Retrieving data:
try {
response = await dexcom.getGlucoseReadings(maxCount: 1, minutes: 60);
print("Read data with dexcom: $dexcom");
} catch (e) {
print("Unable to read data with dexcom: $e");
}
if (response != null) {
print("Data received: $response");
return response;
else {
print("Data is null");
}
Additional information #
This package was based off of pydexcom for Python. I (and some help from ChatGPT) ported it to Flutter.
WARNING: THIS PACKAGE IS STILL IN BETA: IT MAY BE UNSTABLE! USE AT YOUR OWN RISK!