Skip to content

Commit

Permalink
feat: added isInspectorOpened
Browse files Browse the repository at this point in the history
  • Loading branch information
jhomlala committed Nov 12, 2023
1 parent a5818d3 commit 0887954
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* [BREAKING_CHANGE] Updated dart min version to 3.0.0.
* [BREAKING_CHANGE] Removed `darkTheme` parameter. Alice will now automatically detect the color scheme.
* [BREAKING_CHANGE] Alice will now return chopper interceptor instance instead of list with that interceptor.
* Added `isInspectorOpened` method to check inspector state.
* Fixed issue with the same http call not properly handled with chopper. Alice will add "alice_token" to the headers of the request to identify given http call.
* Updated dependencies.
* Fixed lints.
* Updated dependencies.
* Updated example.

# 0.3.3
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ alice.addLogs(logList);
```


## Inspector state

Check current inspector state (opened/closed) with:

```dart
alice.isInspectorOpened();
```


## Extensions
You can use extensions to shorten your http and http client code. This is optional, but may improve your codebase.
Expand Down
5 changes: 5 additions & 0 deletions lib/alice.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ class Alice {
void addLogs(List<AliceLog> logs) {
_aliceCore.addLogs(logs);
}

/// Returns flag which determines whether inspector is opened
bool isInspectorOpened() {
return _aliceCore.isInspectorOpened();
}
}
5 changes: 5 additions & 0 deletions lib/core/alice_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,9 @@ class AliceCore {
void addLogs(List<AliceLog> logs) {
_aliceLogger.logs.addAll(logs);
}

/// Returns flag which determines whether inspector is opened
bool isInspectorOpened() {
return _isInspectorOpened;
}
}

0 comments on commit 0887954

Please sign in to comment.