error_stack 2.0.0
error_stack: ^2.0.0 copied to clipboard
ErrorStack helps you swiftly deal with errors in your Flutter applications! Custom error handling UI and logging to keep you productive.
2.0.0 - 2026-02-04 #
Breaking Changes #
- Refactored
ErrorStackinto multiple single-responsibility classes following SOLID principles ErrorStack.init()now accepts optionalstorageanddevPanelConfigparametersErrorStackDebugWidgetnow uses constructor injection instead of accessingErrorStack.instance
New Features #
Dev Panel
A comprehensive runtime debugging tool accessible via long-press on the "Dev Panel" bar or programmatically via ErrorStack.showDevPanel(context):
- API Tab - HTTP request/response logging with timing, headers, and body data
- Logs Tab - Console logging with severity levels (debug, info, warning, error)
- Routes Tab - Navigation history tracking with route names and arguments
- Storage Tab - View local storage data (Secure Storage & Shared Preferences)
- UI Tab - Visual debugging tools:
- Grid paper overlay
- Layout bounds visualization
- Text scale adjustment (0.5-3.0x)
- Color blindness simulation (protanopia, deuteranopia, tritanopia)
- Slow animations (5x)
- Performance overlay
- Safe area visualization
Dio Integration
ErrorStackDioInterceptor- Automatic HTTP logging for Dio requests- Separate import:
import 'package:error_stack/error_stack_dio.dart'
Navigator Observer
ErrorStackNavigatorObserver- Automatic route tracking for navigation history
Core Architecture
ErrorStackConfig- Configuration class for level, initialRoute, themeMode, customErrorWidget, forceDebugWidgetErrorStackStorageBase- Abstract interface for storage (enables custom implementations/mocking)ErrorStackStorage- Default FlutterSecureStorage implementationErrorStackHandler- Encapsulates error handling logic, stack trace parsing, widget buildingDevPanelConfig- Configuration for dev panel features and log limitsDevPanelStore- Central data store for all debug data (ChangeNotifier)
New APIs
ErrorStack.builder- Builder function for MaterialApp to add dev panel and UI overlaysErrorStack.showDevPanel(context)- Programmatically show the dev panelErrorStack.isInitialized- Check if ErrorStack has been initializedDevPanelStore.instance- Access logging APIs (debug, info, warning, error, logApi, trackRoute)
Copy Markdown Button
- The "Copy markdown" button in `ErrorStackDebugWidget` now copies a structured markdown report to the clipboard (instead of opening a Google search). The report includes:
* Exception message
* Full stack trace
* Source file path
* Environment info (platform, OS version, timestamp, debug mode)
Tests #
- Comprehensive test suite with ~490 tests covering all components
File Structure #
lib/
├── error_stack.dart # Main entry point & exports
├── error_stack_dio.dart # Dio interceptor export
├── src/
│ ├── config/ # Configuration classes
│ ├── storage/ # Storage abstraction
│ ├── handler/ # Error handling logic
│ └── dev_panel/ # Dev panel components
│ ├── data/ # Store, models, collections
│ ├── widgets/ # Panel UI & tabs
│ ├── interceptors/ # Dio interceptor
│ └── observers/ # Navigator observer
└── widgets/ # Error display widgets
1.10.4 - 2025-12-13 #
- fix dart analysis issues
- Update pubspec.yaml
1.10.3 - 2025-02-23 #
- Update GitHub workflows
- Update pubspec.yaml
1.10.2 - 2025-02-04 #
- Update the pubspec.yaml
1.10.1 - 2025-01-04 #
- Update the pubspec.yaml
1.10.0 - 2024-12-31 #
- Refactor as per flutter_lints suggestions
- Update copyright year
- Update the pubspec.yaml
1.9.1 - 2024-08-09 #
- Update debug widget
1.9.0 - 2024-07-24 #
- Merge PR from @SalihCanBinboga to allow the debug widget to be shown in release mode
1.8.1 - 2024-07-20 #
- Update debug widget
1.8.0 - 2024-07-06 #
- Update default height of the debug widget to 580.0
- Set maxLines to 5 for the
exceptionAsStringvalue in the debug widget - Update README.md
1.7.3 - 2024-06-15 #
- Update README.md
1.7.2 - 2024-06-15 #
- Update README.md
1.7.1 - 2024-06-14 #
- Add extra check in
ErrorWidget.builderto get file name from the stack trace
1.7.0 - 2024-06-14 #
- Fix error with Web not working
- Add new Regex to catch more
classNamesin the stack trace ErrorStackLogLevel.verbose(default)- Fix example project
- Update README.md
1.6.0 - 2024-06-12 #
- Update screenshots
1.5.0 - 2024-06-10 #
- Add
errorWidgetto ErrorStack init method. This allows you to set a custom error widget to be displayed when an error occurs in production.
1.4.0 - 2024-06-05 #
- Update debug and release widget to support responsive design.
1.3.4 - 2024-05-22 #
- Update pubspec.yaml
1.3.3 - 2024-05-17 #
- Update pubspec.yaml
1.3.2 - 2024-05-14 #
- Update pubspec.yaml
1.3.1 - 2024-05-12 #
- Update pubspec.yaml
- Update workflow
1.3.0 - 2024-05-11 #
- Update pubspec.yaml
1.2.1 - 2024-05-04 #
- Update logo
- Update README.md
- Small tweak to storage key
1.2.0 - 2024-05-01 #
- Update README.md
1.1.0 - 2024-05-01 #
- Remove
nylodependency. - Add
flutter_secure_storagedependency. - Update debug and release widget.
1.0.0 - 2024-05-01 #
- Initial release.
