VenturoApiConfig class

Configuration class for Venturo API Extends Dio's BaseOptions to provide default configurations

Inheritance

Constructors

VenturoApiConfig.new({String? method, String baseUrl = '', Duration? connectTimeout = CONNECTION_TIME_OUT, Duration? receiveTimeout = RECEIVE_TIME_OUT, Duration? sendTimeout = SEND_TIME_OUT, Map<String, dynamic>? queryParameters, Map<String, dynamic>? extra, Map<String, dynamic>? headers, bool? preserveHeaderCase = false, ResponseType? responseType = ResponseType.json, String? contentType, bool validateStatus(int?)?, bool? receiveDataWhenStatusError = RECEIVE_DATA_WHEN_ERROR, bool? followRedirects, int? maxRedirects, bool? persistentConnection, FutureOr<List<int>> requestEncoder(String, RequestOptions)?, FutureOr<String?> responseDecoder(List<int>, RequestOptions, ResponseBody)?, ListFormat? listFormat, VenturoApiSecurity? security, VenturoApiInterceptor configureInterceptor = const VenturoApiInterceptor()})
Factory method to create an instance of VenturoApiConfig
factory

Properties

baseUrl String
Request base url, it can be multiple forms:
getter/setter pairinherited
configureInterceptor VenturoApiInterceptor
Configuration for API interceptors
final
connectTimeout Duration?
Timeout when opening a request.
getter/setter pairinherited
contentType String?
getter/setter pairinherited
extra Map<String, dynamic>
getter/setter pairinherited
followRedirects bool
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
getter/setter pairinherited
listFormat ListFormat
getter/setter pairinherited
maxRedirects int
getter/setter pairinherited
method String
getter/setter pairinherited
persistentConnection bool
getter/setter pairinherited
preserveHeaderCase bool
getter/setter pairinherited
queryParameters Map<String, dynamic>
Common query parameters.
getter/setter pairinherited
receiveDataWhenStatusError bool
getter/setter pairinherited
receiveTimeout Duration?
getter/setter pairinherited
requestEncoder RequestEncoder?
getter/setter pairinherited
responseDecoder ResponseDecoder?
getter/setter pairinherited
responseType ResponseType
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
security VenturoApiSecurity?
Security settings for API requests
getter/setter pair
sendTimeout Duration?
getter/setter pairinherited
validateStatus ValidateStatus
getter/setter pairinherited

Methods

copyWith({String? method, String? baseUrl, Map<String, dynamic>? queryParameters, String? path, Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, Map<String, Object?>? extra, Map<String, Object?>? headers, bool? preserveHeaderCase, ResponseType? responseType, String? contentType, ValidateStatus? validateStatus, bool? receiveDataWhenStatusError, bool? followRedirects, int? maxRedirects, bool? persistentConnection, RequestEncoder? requestEncoder, ResponseDecoder? responseDecoder, ListFormat? listFormat, VenturoApiSecurity? security, VenturoApiInterceptor? configureInterceptor}) VenturoApiConfig
Creates a copy of the existing configuration with updated values.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace(VenturoApiConfig? config) VenturoApiConfig
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

CONNECTION_TIME_OUT → const Duration
Default connection timeout duration
DEFAULT_HEADERS → const VenturoHeaderType
Default header type for API requests
RECEIVE_DATA_WHEN_ERROR → const bool
Determines whether to receive data even when an error occurs
RECEIVE_TIME_OUT → const Duration
Default receive timeout duration
SEND_TIME_OUT → const Duration
Default send timeout duration