Viewing version 1.0.0. Open the latest package page.

dio_web_adapter

1.0.0

An adapter that supports Dio on Web.

Download archive

Readme

dio_web_adapter

pub package likes popularity pub points

If you encounter bugs, consider fixing it by opening a PR or at least contribute a failing test case.

This package contains adapters for Dio which enables you to use the library on the Web platform.

Versions compatibility

Version Dart (min) Flutter (min)
1.x 2.18.0 3.3.0
2.x 3.3.0 3.19.0

Note: the resolvable version will be determined by the SDK you are using. Run dart pub upgrade or flutter pub upgrade to get the latest resolvable version.

Get started

The package is embedded into the package:dio. You don't need to explicitly install the package unless you have other concerns.

Install

Add the dio_web_adapter package to your pubspec dependencies.

Example

import 'package:dio/dio.dart';
// The import is not required and could produce lints.
// import 'package:dio_web_adapter/dio_web_adapter.dart';

void main() async {
  final dio = Dio();
  dio.httpClientAdapter = BrowserHttpClientAdapter(withCredentials: true);

  // Make a request.
  final response = await dio.get('https://dart.dev');
  print(response);
}
Changelog

Unreleased

None.

1.0.0

  • Split the Web ability from the package:dio.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'dio_web_adapter:1.0.0'
pubspec.yaml
name: dio_web_adapter
version: 1.0.0

description: An adapter that supports Dio on Web.
topics:
  - dio
  - http
  - network
  - web
  - wasm
homepage: https://github.com/cfug/dio
repository: https://github.com/cfug/dio/blob/main/plugins/web_adapter
issue_tracker: https://github.com/cfug/dio/issues

environment:
  sdk: '>=2.18.0 <4.0.0'
#  sdk: '>=3.3.0 <4.0.0'

dependencies:
  dio: ^5.0.0
  http_parser: ^4.0.0
  meta: ^1.5.0
#  web: '>=0.5.0 <0.6.0'

dev_dependencies:
  lints: any
  test: ^1.5.0

Version history

VersionPublishedArchiveSHA-256
1.0.0Cached · Upstream SHA-256 matchedDownloada6d4a42b…15d224
1.0.1Cached · Upstream SHA-256 matchedDownload36c5b2d7…90aeac
1.1.0Cached · Upstream SHA-256 matchedDownload9e57d2be…d4cd61
1.1.1Cached · Upstream SHA-256 matchedDownload0a2e95fc…66b479
2.0.0Cached · Upstream SHA-256 matchedDownload33259a92…620dc8
2.1.0Cached · Upstream SHA-256 matchedDownloade485c7a3…c4f93a
2.1.1Cached · Upstream SHA-256 matchedDownload7586e476…378d78
2.1.2Cached · Upstream SHA-256 matchedDownload2f9e6432…c1f340
2.2.0Cached · Upstream SHA-256 matchedDownloaddd58dc38…e362e4
2.2.1Cached · Upstream SHA-256 matchedDownload0786d0b7…24212c
2.2.2Cached · Upstream SHA-256 matchedDownload3a1b2cd7…102bfc

Dependencies

dio "^5.0.0"

http_parser "^4.0.0"

meta "^1.5.0"