Skip to content

Commit

Permalink
📝 Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Nov 25, 2023
1 parent 61e15dd commit bb5e9ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion plugins/native_dio_adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Unreleased

*None.*
- Adds `createCronetEngine` and `createCupertinoConfiguration`
to deprecate `cronetEngine` and `cupertinoConfiguration`
for the `NativeAdapter`, to avoid platform exceptions.

## 1.1.1

Expand Down
4 changes: 1 addition & 3 deletions plugins/native_dio_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ Add the `native_dio_adapter` package to your

```dart
final dioClient = Dio();
if (Platform.isIOS || Platform.isMacOS || Platform.isAndroid) {
dioClient.httpClientAdapter = NativeAdapter();
}
dioClient.httpClientAdapter = NativeAdapter();
```

## 📣 About the author
Expand Down
6 changes: 4 additions & 2 deletions plugins/native_dio_adapter/lib/src/native_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ class NativeAdapter implements HttpClientAdapter {
URLSessionConfiguration Function()? createCupertinoConfiguration,
@Deprecated(
'Use createCronetEngine instead. '
'This will cause platform exception on iOS/macOS platforms',
'This will cause platform exception on iOS/macOS platforms. '
'This will be removed in v2.0.0',
)
CronetEngine? androidCronetEngine,
@Deprecated(
'Use createCupertinoConfiguration instead. '
'This will cause platform exception on the Android platform',
'This will cause platform exception on the Android platform. '
'This will be removed in v2.0.0',
)
URLSessionConfiguration? cupertinoConfiguration,
}) {
Expand Down

0 comments on commit bb5e9ec

Please sign in to comment.