NativeAdapter class
A HttpClientAdapter for Dio which delegates HTTP requests
to the native platform, where possible.
On iOS and macOS this uses cupertino_http to make HTTP requests.
On Android this uses cronet_http to make HTTP requests.
Constructors
- NativeAdapter({CronetEngine createCronetEngine()?, URLSessionConfiguration createCupertinoConfiguration()?, @Deprecated('Use createCronetEngine instead. ' '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 be removed in v2.0.0') URLSessionConfiguration? cupertinoConfiguration})
Properties
- adapter → HttpClientAdapter
-
The underlying client adapter.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
{bool force = false}) → void - Close the current adapter and its inner clients or requests.
-
fetch(
RequestOptions options, Stream< Uint8List> ? requestStream, Future? cancelFuture) → Future<ResponseBody> - Implement this method to make real HTTP requests.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited