Skip to content

Commit 487e344

Browse files
agordn52claude
andcommitted
v2.0.0 - Major release with Dev Panel and SOLID architecture
Breaking Changes: - Refactored ErrorStack into single-responsibility classes - ErrorStack.init() accepts optional storage and devPanelConfig - ErrorStackDebugWidget uses constructor injection New Features: - Dev Panel with 5 tabs (API, Logs, Routes, Storage, UI) - Dio Integration via ErrorStackDioInterceptor - Navigator Observer for route tracking - Storage abstraction layer (ErrorStackStorageBase) - Copy Markdown button for error reports - New APIs: builder, showDevPanel, isInitialized Tests: - Comprehensive test suite (~490 tests) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4b2e178 commit 487e344

68 files changed

Lines changed: 12287 additions & 281 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage_darwin","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_darwin-0.2.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-10.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.2.17/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.16/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_secure_storage_darwin","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_darwin-0.2.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-3.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-2.1.0/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_darwin","flutter_secure_storage_linux","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_darwin","dependencies":[]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2025-12-13 15:28:06.139109","version":"3.38.4","swift_package_manager_enabled":{"ios":false,"macos":false}}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage_darwin","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_darwin-0.2.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.6/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-10.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_secure_storage_darwin","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_darwin-0.2.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.5.1/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-3.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-2.1.0/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_darwin","flutter_secure_storage_linux","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_darwin","dependencies":[]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2026-02-03 20:59:27.625212","version":"3.38.9","swift_package_manager_enabled":{"ios":false,"macos":false}}

.github/workflows/publish.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,4 @@ jobs:
3535
with:
3636
credentialJson: ${{ secrets.CREDENTIAL_SECRET }}
3737
flutter: true
38-
skipTests: true
39-
40-
- name: Update nylo.dev
41-
uses: fjogeleit/http-request-action@v1
42-
with:
43-
url: 'https://nylo.dev/api/github/actions/error-stack/version'
44-
method: 'POST'
45-
customHeaders: '{"Content-Type": "application/json", "X-GH-API-KEY": "${{ secrets.NYLO_API_GH_SECRET }}"}'
46-
data: '{"version": "${{ github.ref_name }}"}'
38+
skipTests: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ migrate_working_dir/
2727
**/doc/api/
2828
.dart_tool/
2929
build/
30+
31+
CLAUDE.md
32+
.claude

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
1+
## [2.0.0] - 2026-02-04
2+
3+
### Breaking Changes
4+
5+
* Refactored `ErrorStack` into multiple single-responsibility classes following SOLID principles
6+
* `ErrorStack.init()` now accepts optional `storage` and `devPanelConfig` parameters
7+
* `ErrorStackDebugWidget` now uses constructor injection instead of accessing `ErrorStack.instance`
8+
9+
### New Features
10+
11+
#### Dev Panel
12+
A comprehensive runtime debugging tool accessible via long-press on the "Dev Panel" bar or programmatically via `ErrorStack.showDevPanel(context)`:
13+
14+
* **API Tab** - HTTP request/response logging with timing, headers, and body data
15+
* **Logs Tab** - Console logging with severity levels (debug, info, warning, error)
16+
* **Routes Tab** - Navigation history tracking with route names and arguments
17+
* **Storage Tab** - View local storage data (Secure Storage & Shared Preferences)
18+
* **UI Tab** - Visual debugging tools:
19+
* Grid paper overlay
20+
* Layout bounds visualization
21+
* Text scale adjustment (0.5-3.0x)
22+
* Color blindness simulation (protanopia, deuteranopia, tritanopia)
23+
* Slow animations (5x)
24+
* Performance overlay
25+
* Safe area visualization
26+
27+
#### Dio Integration
28+
* **`ErrorStackDioInterceptor`** - Automatic HTTP logging for Dio requests
29+
* Separate import: `import 'package:error_stack/error_stack_dio.dart'`
30+
31+
#### Navigator Observer
32+
* **`ErrorStackNavigatorObserver`** - Automatic route tracking for navigation history
33+
34+
#### Core Architecture
35+
* **`ErrorStackConfig`** - Configuration class for level, initialRoute, themeMode, customErrorWidget, forceDebugWidget
36+
* **`ErrorStackStorageBase`** - Abstract interface for storage (enables custom implementations/mocking)
37+
* **`ErrorStackStorage`** - Default FlutterSecureStorage implementation
38+
* **`ErrorStackHandler`** - Encapsulates error handling logic, stack trace parsing, widget building
39+
* **`DevPanelConfig`** - Configuration for dev panel features and log limits
40+
* **`DevPanelStore`** - Central data store for all debug data (ChangeNotifier)
41+
42+
#### New APIs
43+
* `ErrorStack.builder` - Builder function for MaterialApp to add dev panel and UI overlays
44+
* `ErrorStack.showDevPanel(context)` - Programmatically show the dev panel
45+
* `ErrorStack.isInitialized` - Check if ErrorStack has been initialized
46+
* `DevPanelStore.instance` - Access logging APIs (debug, info, warning, error, logApi, trackRoute)
47+
48+
#### Copy Markdown Button
49+
- The "Copy markdown" button in `ErrorStackDebugWidget` now copies a structured markdown report to the clipboard (instead of opening a Google search). The report includes:
50+
* Exception message
51+
* Full stack trace
52+
* Source file path
53+
* Environment info (platform, OS version, timestamp, debug mode)
54+
55+
### Tests
56+
57+
* Comprehensive test suite with ~490 tests covering all components
58+
59+
### File Structure
60+
61+
```
62+
lib/
63+
├── error_stack.dart # Main entry point & exports
64+
├── error_stack_dio.dart # Dio interceptor export
65+
├── src/
66+
│ ├── config/ # Configuration classes
67+
│ ├── storage/ # Storage abstraction
68+
│ ├── handler/ # Error handling logic
69+
│ └── dev_panel/ # Dev panel components
70+
│ ├── data/ # Store, models, collections
71+
│ ├── widgets/ # Panel UI & tabs
72+
│ ├── interceptors/ # Dio interceptor
73+
│ └── observers/ # Navigator observer
74+
└── widgets/ # Error display widgets
75+
```
76+
177
## [1.10.4] - 2025-12-13
278

379
* fix dart analysis issues

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Anthony Gordon
3+
Copyright (c) 2026 Anthony Gordon
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)