Installation
Add carp_debug_flutter as a dev dependency and configure iOS and Android.
Add the dependency
Add the package under
dev_dependenciesso it is excluded from production archives (see Production builds).pub.dev Git Local path Use a path dependency for local development:
The built-in Shared Preferences and Database tools depend on
shared_preferencesandsembast. If your app already uses them, as every CARP app does, no extra setup is needed.Then fetch the dependencies:
Note
Follow Production builds so release builds compile and ship nothing from the toolkit package. If you add it under
dependenciesinstead and only setenabled: falseat runtime, the package is still in the archive and users might find a way to access it.Configure the platforms
Android iOS minSdk 24andcompileSdk 34or higher are required.The minimum deployment target is iOS 15.0. The plugin supports both Swift Package Manager and CocoaPods; Swift Package Manager is recommended.
Note
If you switch a project from CocoaPods to Swift Package Manager, run
pod deintegratefirst and make sureplatform :iosinios/Podfileis at least15.0.Wrap your app
Continue to the Quickstart to wrap your app's root widget in
CarpDebugToolkit.
Keeping it out of production
Exclude the toolkit from the release archive. With the package declared as a dev_dependency, reference it only from kDebugMode-gated code, so it is both disabled at runtime and excluded from the release archive:
The full pattern (app-local hook, debug-only setup file and per-platform exclusion details) is on the Production builds page.
Runtime switch
CarpDebugToolkit also accepts an enabled flag (default true) for cases where the package stays in the build but you want a runtime switch. When enabled is false, CarpDebugToolkit returns its child untouched, with zero overhead.