Viewing version 1.1.0. Open the latest package page.
dio_web_adapter
1.1.0An adapter that supports Dio on Web.
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 upgradeorflutter pub upgradeto 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.1.0
- Support
FileAccessModeinDio.downloadandDio.downloadUrito change download file opening mode.
1.0.1
- Improves warning logs on the Web platform.
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.1.0'pubspec.yaml
name: dio_web_adapter
version: 1.1.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'
dependencies:
dio: ^5.8.0
http_parser: ^4.0.0
meta: ^1.5.0
dev_dependencies:
lints: any
test: ^1.5.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | Cached · Upstream SHA-256 matched | Download | a6d4a42b…15d224 |
| 1.0.1 | Cached · Upstream SHA-256 matched | Download | 36c5b2d7…90aeac |
| 1.1.0 | Cached · Upstream SHA-256 matched | Download | 9e57d2be…d4cd61 |
| 1.1.1 | Cached · Upstream SHA-256 matched | Download | 0a2e95fc…66b479 |
| 2.0.0 | Cached · Upstream SHA-256 matched | Download | 33259a92…620dc8 |
| 2.1.0 | Cached · Upstream SHA-256 matched | Download | e485c7a3…c4f93a |
| 2.1.1 | Cached · Upstream SHA-256 matched | Download | 7586e476…378d78 |
| 2.1.2 | Cached · Upstream SHA-256 matched | Download | 2f9e6432…c1f340 |
| 2.2.0 | Cached · Upstream SHA-256 matched | Download | dd58dc38…e362e4 |
| 2.2.1 | Cached · Upstream SHA-256 matched | Download | 0786d0b7…24212c |
| 2.2.2 | Cached · Upstream SHA-256 matched | Download | 3a1b2cd7…102bfc |
Dependencies
dio "^5.8.0"
http_parser "^4.0.0"
meta "^1.5.0"