Skip to content

Commit

Permalink
chore/disable-devtools-manually
Browse files Browse the repository at this point in the history
  • Loading branch information
nank1ro committed Dec 30, 2023
1 parent 0dd5e2c commit 5f33d8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/solidart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.5.4

- **CHORE**: Add `devToolsEnabled` option to manually disable the DevTools extension that defaults to `kDebugMode`

## 1.5.3

- **BUGFIX**: Fix an auto dispose issue of Signals that have some active observations.
Expand Down
3 changes: 3 additions & 0 deletions packages/solidart/lib/src/core/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ abstract class SolidartConfig {
/// true.
static bool autoDispose = true;

/// Whether to enable the DevTools extension, defaults to kDebugMode.
static bool devToolsEnabled = true;

/// The list of observers.
static final observers = <SolidartObserver>[];
}
Expand Down
1 change: 1 addition & 0 deletions packages/solidart/lib/src/core/devtools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ part of 'core.dart';

// coverage:ignore-start
bool get _devtoolsEnabled {
if (!SolidartConfig.devToolsEnabled) return false;
var debugMode = false;
assert(
() {
Expand Down
2 changes: 1 addition & 1 deletion packages/solidart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: solidart
description: A simple State Management solution for Dart applications inspired by SolidJS
version: 1.5.3
version: 1.5.4
repository: https://github.com/nank1ro/solidart
documentation: https://docs.page/nank1ro/solidart~dev
topics:
Expand Down

0 comments on commit 5f33d8c

Please sign in to comment.