dio_flutter_transformer Pub

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

Install

dependencies:
  dio_flutter_transformer: ^2.x.x # 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=new FlutterTransformer(); // replace dio default transformer
dio.get(...);

Libraries

dio_flutter_transformer