dio_brotli_transformer 0.2.1
dio_brotli_transformer: ^0.2.1 copied to clipboard

Flutter Android iOS web

Brotli support for Dio http client

Dio Brotli transformer #

Build Pub

Brotli response support for Dio http client

Get started #

Installation #

In pubspec.yaml add the following dependency:

dependencies:
  dio_brotli_transformer: ^0.2.1

Super simple to use #

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

final dio = Dio(BaseOptions(
  headers: {
    'accept-encoding': 'br',
  },
 ));

dio.transformer = DioBrotliTransformer();

Examples #

Change default transformer #

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

final dio = Dio(BaseOptions(
  headers: {
    'accept-encoding': 'br',
  },
));

dio.transformer = DioBrotliTransformer(transformer: DefaultTransformer());
0
likes
100
pub points
30%
popularity

Publisher

vycius.lt

Brotli support for Dio http client

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

brotli, dio

More

Packages that depend on dio_brotli_transformer