Skip to content

Commit 7f58cdb

Browse files
committed
Disable Billing & Usage features.
1 parent bb84fc7 commit 7f58cdb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/src/logging/stat_tracker.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import 'package:meta/meta.dart';
77
import '../../codelessly_sdk.dart';
88
import '../utils/debouncer.dart';
99

10+
const _kDisableStatReporting = true;
11+
1012
/// A class that tracks statistics of various operations in the SDK.
1113
abstract class StatTracker {
1214
Uri? serverUrl;
@@ -79,6 +81,11 @@ final class CodelesslyStatTracker extends StatTracker {
7981
/// Sends the batch of stats to the server.
8082
Future<void> sendBatch() => debouncer.run(
8183
() async {
84+
if (_kDisableStatReporting) {
85+
statBatch.clear();
86+
return;
87+
}
88+
8289
// TODO(Saad): Use an HTTP client.
8390
await post(
8491
serverUrl!,

0 commit comments

Comments
 (0)