Skip to content

Commit

Permalink
Support enable logs (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored Nov 28, 2024
1 parent a498051 commit 9353b6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/matrix_api_lite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ export 'src/utils/logs.dart';
export 'src/utils/map_copy_extension.dart';
export 'src/utils/try_get_map_extension.dart';
export 'src/values.dart';
export 'src/utils/debug_utils.dart';
5 changes: 5 additions & 0 deletions lib/src/utils/debug_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ class DebugUtils {

static final DebugUtils _instance = DebugUtils._internal();

static bool enableLogs = false;

DebugUtils._internal();

factory DebugUtils() {
return _instance;
}

bool get isDebugMode {
if (enableLogs) {
return enableLogs;
}
bool inDebugMode = false;
assert(inDebugMode = true);
return inDebugMode;
Expand Down

0 comments on commit 9353b6d

Please sign in to comment.