DexcomConnector class

DexcomConnector is a class that is in charge of managing the connection authorization between the app and Dexcom APIs. In details, it can authorize the app thus retaining the access and refresh tokens (see DexcomConnector.authorize for more details), refresh the access token if needed (see DexcomConnector.refreshToken for more details), unauthorize the app (see DexcomConnector.unauthorize for more details), and check for the access token status (see DexcomConnector.isTokenValid for more details).

Constructors

DexcomConnector()
Public factory constructor of DexcomConector.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

authorize({BuildContext? context, required String clientID, required String clientSecret, required String redirectUri, required String callbackUrlScheme, required bool isSandbox}) Future<bool>
Method that implements the OAuth 2.0 protocol and gets (and retain) in the SharedPreferences the access and refresh tokens from Dexcom APIs.
refreshToken({BuildContext? context, required String clientID, required String clientSecret, required bool isSandbox}) Future<bool>
Method that refreshes the Dexcom access token.
tokenNeedRefresh() bool
Method that checks if the Dexcom access_token needs to be refreshed.
unauthorize() Future<void>
Method that revokes the current access, refreshes tokens and deletes them from the SharedPreferences.