dio_auth_guard 0.0.1
dio_auth_guard: ^0.0.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.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add dio_auth_guardThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
dio_auth_guard: ^0.0.1Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:dio_auth_guard/dio_auth_guard.dart';