dio_flutter_transformer

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


License
Other

Documentation

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(...);