BowlerKitBowlerKit
Features

Logging & Debugging

10/11/2026

Use Talker, Dio diagnostics, Riverpod observers, and profile-aware error handling safely.

Logging stack

The Flutter template uses:

  • Talker from helpers/log.dart for application logs.
  • TalkerDioLogger on Dio for request/response/error diagnostics.
  • TalkerRiverpodObserver in main.dart for provider state transitions.
  • Provider error states and ApiResult parsing for user-facing failures.

The current interceptors are registered during Dio setup; do not assume all logging disappears in release. Configure/restrict logging for production builds.

Sensitive data warning

Dio is configured to print request headers/data, and _injectToken() currently logs token-injection diagnostics. Never ship bearer tokens, passwords, reset tokens, FCM tokens, or PII in logs. Remove/redact those fields or gate Talker interceptors behind a debug/build flag before production distribution.

API debugging

Check:

  1. API_BASE_URL is the host root and reachable from the device.
  2. Endpoints.buildApiPath adds /api/v1 exactly once.
  3. Laravel is running and the Sanctum token is valid.
  4. Go, if enabled, can reach shared PostgreSQL and Redis.
  5. Guest code is not invoking Account providers; Guest Dio calls fail closed intentionally.

A 401 invokes the unauthorized handler and clears the local Account session. Cache hits/stale-on-error are controlled by dio_cache_interceptor; use forceRefresh: true after mutations or when validating current session data.

Crash reporting

firebase_crashlytics is present in pubspec.yaml, but the template does not initialize a Crashlytics collection flow in main.dart. Do not document crash reporting as active until you add Firebase initialization, consent/collection policy, and release-symbol configuration.

Relevant files

  • helpers/log.dart
  • services/dio_service.dart
  • services/api_service.dart
  • providers/dio_provider.dart
  • main.dart
  • bootstrap/account_bootstrap.dart