api_provider 2.0.0
api_provider: ^2.0.0 copied to clipboard
A thin, testable layer over Dio for Flutter apps - bearer-token auth, automatic token refresh with retry, secure token storage, and friendly error handling.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add api_providerThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
api_provider: ^2.0.0Alternatively, 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:api_provider/api_provider.dart';