dio_auth_guard 0.2.1
dio_auth_guard: ^0.2.1 copied to clipboard
Automatically handles 401/403 responses in Dio — cancels all in-flight requests and navigates to a custom unauthenticated screen. Router-agnostic.
0.2.1 #
- Inspector UI redesigned in dark mode
- Expandable cards in list — tap to expand inline (no bottom sheet)
- List shows only the endpoint path, not the full URL
- Stats bar at top: Total / Success / Failed counts
- Filter via popup menu (All / Success Only / Failed Only / Clear All)
- Error reason shown on failure: error type + message (e.g. connectionTimeout)
- Method badges and status badges use dark-themed accent colours
- cURL section and response body shown inline with copy button
LogEntrynow captureserrorMessageanderrorTypefromDioException
0.2.0 #
- Added built-in API Inspector Screen
- Full cURL command for every request with copy button
- Request headers, body, response — vertical Postman-style layout
- Filter logs: All / Success / Failed
- Response type mismatch detection with clear field-level warnings
- Max 100 logs with auto-rotation (oldest removed)
- Auto-disabled in release mode (
kDebugMode) - New:
AuthGuardConfig.showInspector(context) - New:
inspectorEnabledparam inAuthGuardConfig.init()
0.0.1 #
- Initial release
AuthGuardsingleton with debounced 401/403 handlingCancelTokenmanagement for in-flight request cancellation- Router-agnostic navigation via
onUnauthenticatedcallback orunauthWidget AuthGuardModulefor easy Dio interceptor registration and removalAuthGuard.onLoginSuccess()andAuthGuard.onLogout()lifecycle hooks