dexcom 1.0.1 copy "dexcom: ^1.0.1" to clipboard
dexcom: ^1.0.1 copied to clipboard

dexcom for Dart allows you to use Dexcom Share to get your Dexcom CGM data, or anybody else's, to run your application.

example/lib/example.dart

import 'package:dexcom/dexcom.dart';

void main({String username = "", String password = ""}) async {
  Dexcom dexcom = Dexcom(username: username, password: password, debug: false);
  DexcomStreamProvider provider = DexcomStreamProvider(
    dexcom,
    debug: true,
    buffer: 10,
  );

  print("Dexcom: $dexcom");
  print("Provider: $provider");

  print("Dexcom readings: ${await dexcom.getGlucoseReadings(maxCount: 3)}");
  print("Dexcom verify: ${await dexcom.verify()}");

  provider.listen(
    onData: (data) => print('Stream received: $data'),
    onError: (error) => print('Stream errored: $error'),
    onTimerChange: (time) {
      print("Stream timer: $time");
    },
  );
}
2
likes
160
points
54
downloads

Publisher

verified publishercalebh101.com

Weekly Downloads

dexcom for Dart allows you to use Dexcom Share to get your Dexcom CGM data, or anybody else's, to run your application.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http, intl

More

Packages that depend on dexcom