lib/http_inspector.dartis the public entrypoint exporting the package API.lib/src/interceptors/housesHttpInspectorInterceptorand config;lib/src/models/defines network records and options;lib/src/loggers/handles console output;lib/src/ui/contains views and widgets;lib/src/utils/offers extensions/helpers;lib/src/theme/andlib/src/l10n/centralize styling and strings.- Assets (screenshots) live in
assets/. The example Flutter app is underexample/with platform scaffolding andexample/lib/main.dart. - Tests are currently minimal; add new coverage under
test/mirroring the source structure.
flutter pub get— install dependencies.flutter format .— apply standard Dart formatting.flutter analyze— run static analysis using Very Good Analysis rules.flutter test— execute repository tests.cd example && flutter run— launch the sample app to exercise the inspector UI.cd example && flutter test— run example-specific tests.
- Follow the Very Good Analysis lint set (see
analysis_options.yaml); use 2-space indentation, preferconst, and keep imports tidy. - Public APIs use
HttpInspector*prefix exclusively (e.g.HttpInspectorOptions,HttpConsoleColors); internal-only widgets/helpers keepFancy*prefix. Models are PascalCase, files aresnake_case.dart. - Widgets end with
...Widgetor...Page; helpers/providers use descriptive nouns. Favor barrel exports (e.g.,views.dart,interceptors.dart) to keep imports concise.
- Place tests in
_test.dartfiles that mirror source paths (e.g.,test/ui/http_detail_page_test.dartforlib/src/ui/views/http_detail_page.dart). - Use widget tests for UI components and unit tests for helpers, logging, and cURL generation logic.
- The cURL extension (
request_extensions.dart) omits-X GETfor GET requests (curl defaults to GET); write test assertions accordingly. - Include assertions around filtering/search behavior and any new request mutation features. Run
flutter testbefore opening a PR. flutter analyzehas ~52 pre-existing info-level issues fromvery_good_analysis; do not use--fatal-infosin CI — it will always fail on this repo.
- Keep commit messages short, present-tense, and scoped; include an English summary even when adding bilingual notes (existing history mixes both).
- Create feature branches per change. PRs should describe intent, list commands executed, and attach screenshots/GIFs for UI changes (use the example app to capture).
- Link issues or tickets when available, and call out breaking changes or migration steps explicitly.
- Guard the inspector with
kDebugModeor similar flags to avoid exposing traffic in production builds. - Avoid logging or committing secrets/PII; redact tokens in screenshots and sample payloads.
- Keep
maxLogsbounded to limit in-memory retention and surface only necessary headers/bodies.