fresh_dio 0.2.0
fresh_dio: ^0.2.0 copied to clipboard

Dart native js
Flutter Android iOS web

An http interceptor for token refresh. Fresh is built on top of package:dio and manages authentication tokens transparently.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:fresh_example/app/app.dart';
import 'package:fresh_example/simple_bloc_delegate.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:jsonplaceholder_client/jsonplaceholder_client.dart';
import 'package:photos_repository/photos_repository.dart';
import 'package:user_repository/user_repository.dart';

void main() {
  BlocSupervisor.delegate = SimpleBlocDelegate();
  final jsonplaceholderClient = JsonplaceholderClient();
  final photosRepository = PhotosRepository(jsonplaceholderClient);
  final userRepository = UserRepository(jsonplaceholderClient);

  runApp(App(
    photosRepository: photosRepository,
    userRepository: userRepository,
  ));
}
14
likes
110
pub points
87%
popularity

An http interceptor for token refresh. Fresh is built on top of package:dio and manages authentication tokens transparently.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

felangelov@gmail.com

License

MIT (LICENSE)

Dependencies

dio, fresh, meta

More

Packages that depend on fresh_dio