dio_auth_guard 0.0.1 copy "dio_auth_guard: ^0.0.1" to clipboard
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_guard

This 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.1

Alternatively, 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';
4
likes
140
points
83
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Automatically handles 401/403 responses in Dio — cancels all in-flight requests and navigates to a custom unauthenticated screen. Router-agnostic.

Repository (GitHub)
View/report issues

Topics

#dio #authentication #network #interceptor #flutter

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on dio_auth_guard