This package is a fork of dio_flutter_transformer which is no longer maintained.
Through practical experience, we find that although using
computecan make tasks go on in the background, it may lead to slow task execution. So please think carefully before using it.
dependencies: dio_flutter_transformer: ^4.0.1 # latest version
Import the package:
import 'package:dio/dio.dart'; import 'package:dio_flutter_transformer2/dio_flutter_transformer.dart';
Then replace dio default transformer:
var dio=Dio(); dio.transformer = FlutterTransformer(); // replace dio default transformer dio.get(...);