isEnabled static method
Checks whether the BlueConic client is currently enabled asynchronously.
Returns true if the client is enabled and tracking data, false if it's
disabled. This is useful for checking the current privacy/tracking state.
Returns a Future<bool> indicating whether the client is enabled
Implementation
static Future<bool> isEnabled() {
final Completer<bool> completer = Completer<bool>();
BlueConicPlatform.instance.isEnabled().then((result) {
if (result.success) {
completer.complete(result.data as bool);
} else {
completer.completeError(Exception(result.error ?? 'Unknown error'));
}
});
return completer.future;
}