DioClient class
A client for making network requests using Dio.
Constructors
Properties
-
customHeaders
→ FutureOr<
Map< Function()?String, dynamic> > -
final
-
customQuery
→ FutureOr<
Map< Function()?String, dynamic> > -
final
- dio → Dio
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → PlayxNetworkClientSettings
-
final
Methods
-
attachLogSettings(
PlayxNetworkLoggerSettings logSettings) → bool -
delete<
T> (String path, {Object body = const {}, Map< String, dynamic> headers = const {}, Map<String, dynamic> query = const {}, Options? options, String? contentType, bool attachCustomHeaders = true, bool attachCustomQuery = true, CancelToken? cancelToken, PlayxNetworkLoggerSettings? logSettings}) → Future<Response> -
download<
T> (String path, {required dynamic savePath, Map< String, dynamic> headers = const {}, Map<String, dynamic> query = const {}, Options? options, bool attachCustomHeaders = true, bool attachCustomQuery = true, CancelToken? cancelToken, ProgressCallback? onReceiveProgress, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, Object? data, PlayxNetworkLoggerSettings? logSettings, FileAccessMode fileAccessMode = FileAccessMode.write}) → Future<Response> -
Download file from the given
url -
get<
T> (String path, {Map< String, dynamic> headers = const {}, Map<String, dynamic> query = const {}, Options? options, bool attachCustomHeaders = true, bool attachCustomQuery = true, CancelToken? cancelToken, ProgressCallback? onReceiveProgress, PlayxNetworkLoggerSettings? logSettings}) → Future<Response> -
sends a
GETrequest to the givenurl -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch<
T> (String path, {Object body = const {}, Map< String, dynamic> headers = const {}, Map<String, dynamic> query = const {}, Options? options, String? contentType, bool attachCustomHeaders = true, bool attachCustomQuery = true, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, PlayxNetworkLoggerSettings? logSettings}) → Future<Response> -
post<
T> (String path, {Object body = const {}, Map< String, dynamic> headers = const {}, Map<String, dynamic> query = const {}, Options? options, String? contentType, bool attachCustomHeaders = true, bool attachCustomQuery = true, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, PlayxNetworkLoggerSettings? logSettings}) → Future<Response> -
sends a
POSTrequest to the givenurl -
put<
T> (String path, {Object body = const {}, Map< String, dynamic> headers = const {}, Map<String, dynamic> query = const {}, Options? options, String? contentType, bool attachCustomHeaders = true, bool attachCustomQuery = true, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, PlayxNetworkLoggerSettings? logSettings}) → Future<Response> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited