Custom tools
Add your own screens to the debug menu by implementing DebugTool.
Implement DebugTool to add an app-specific screen alongside the built-in tools, then pass it with DebugToolkitConfig.extraTools.
The DebugTool interface
buildPage is pushed onto the toolkit's own navigator, so the page must provide its own scaffold. Use DebugScaffold for a consistent look: it gives you the app bar, an automatic back button and a SafeArea body.
Example: a feature flags tool
Implement the tool
Register the tool
Custom tools are appended after the built-in tools, in the order you provide them.
Reusing toolkit infrastructure
Custom tool pages can use the same building blocks as the built-in tools:
| Building block | Use |
|---|---|
DebugScaffold | Consistent page chrome (title, actions, body, floatingActionButton). |
DebugEnv | Read and write launch-argument overrides from your tool. |
DebugLog | Call DebugLog.instance.log(...) to emit lines into the Logs tool. |
KeyValueStore / DebugDatabase | Reuse the data-source adapters to read app storage. |