Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

flutterchina/dio_flutter_transformer

Repository files navigation

dio_flutter_transformer Pub

The feature is embedded into the dio package and does not require additional setup.

A dio transformer especially for flutter, by which the json decoding will be in background with [compute] function.

Through practical experience, we find that although using compute can make tasks go on in the background, it may lead to slow task execution. So please think carefully before using it.

Install

dependencies:
  dio_flutter_transformer: ^3.0.2 # latest version

Usage

Import the package:

import 'package:dio/dio.dart';
import 'package:dio_flutter_transformer/dio_flutter_transformer.dart';

Then replace dio default transformer:

var dio=Dio();
dio.transformer = FlutterTransformer(); // replace dio default transformer
dio.get(...);

About

A flutter-specific dio transformer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published