fresh_dio 0.3.2 copy "fresh_dio: ^0.3.2" to clipboard
fresh_dio: ^0.3.2 copied to clipboard

outdated

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:flutter_bloc/flutter_bloc.dart';
import 'package:fresh_example/app/app.dart';
import 'package:fresh_example/simple_bloc_observer.dart';
import 'package:jsonplaceholder_client/jsonplaceholder_client.dart';
import 'package:photos_repository/photos_repository.dart';
import 'package:user_repository/user_repository.dart';

void main() {
  BlocOverrides.runZoned(
    () {
      final jsonplaceholderClient = JsonplaceholderClient();
      final photosRepository = PhotosRepository(jsonplaceholderClient);
      final userRepository = UserRepository(jsonplaceholderClient);
      runApp(
        App(
          photosRepository: photosRepository,
          userRepository: userRepository,
        ),
      );
    },
    blocObserver: SimpleBlocObserver(),
  );
}
134
likes
0
pub points
93%
popularity

Publisher

verified publisherfelangel.dev

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, fresh

More

Packages that depend on fresh_dio