Flutter
Flutter integration
Connect Flutter framework and platform hooks, runtime context, build mode, and root navigation presentation.
Flutter integration
ark_error_manager_flutter connects one application-owned manager to Flutter's global framework and platform error callbacks. It does not provide widget-tree access to the manager and does not add Error Manager dependencies to features.
Which boundary sees which error
| Failure path | Capture owner | Ark adapter |
|---|---|---|
| Unhandled async error in the application Zone | Application Bootstrap | manager.onUncaughtZoneError |
| Build, layout, paint, callback, or explicit framework report | Flutter framework | FlutterErrorManagerBinding through FlutterError.onError |
| Unhandled root-isolate error outside a framework callback | Flutter engine | FlutterErrorManagerBinding through PlatformDispatcher.onError |
| Unhandled error in a child Isolate | Isolate owner | IsolateErrorManagerBinding |
These paths are complementary. They are not four handlers to call manually for the same exception.
The root composition
ApplicationBootstrap
├── application-owned Zone
├── ErrorManager
├── FlutterErrorManagerBinding
├── GlobalKey<NavigatorState>
└── MaterialApp / CupertinoApp
Widgets report framework failures through Flutter's normal mechanisms. Presenter, UseCase, Repository, DataSource, Provider, and Widget code do not receive or resolve the manager.
Study:
- Root hooks and ownership for
FlutterError.onError,PlatformDispatcher.onError, previous-handler policy, and detach behavior; - Presentation and runtime context for build-mode detection, bounded Flutter context, and application-defined UI.
Use the complete Flutter tutorial when assembling a new bootstrap.
After the bootstrap works, make three application decisions before production:
- whether a preserved previous handler already reports remotely;
- which presentation directives map to passive, blocking, or no UI;
- which Flutter context fields are allowed to cross the Reporter trust boundary after sanitization.