FlutterNetwork class

Constructors

FlutterNetwork({required String baseUrl, Future<String?> tokenCallback()?, VoidCallback? onUnAuthorizedError, CacheOptions? cacheOptions, RetryInterceptor? retryInterceptor, int connectionTimeout = 30000, int receiveTimeout = 30000})
factory

Properties

baseUrl String
getter/setter pair
cacheOptions CacheOptions?
getter/setter pair
connectionTimeout int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
onUnAuthorizedError VoidCallback
getter/setter pair
receiveTimeout int
getter/setter pair
retryInterceptor RetryInterceptor?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenCallback Future<String?> Function()?
getter/setter pair

Methods

delete(String path, {Map<String, dynamic>? data, APIType apiType = APIType.public, TokenType tokenType = TokenType.bearer, Map<String, dynamic>? headers, Map<String, dynamic>? query}) Future<Response>
get(String path, {APIType apiType = APIType.public, TokenType tokenType = TokenType.bearer, Map<String, dynamic>? query, Map<String, dynamic>? headers, bool isCacheEnabled = false}) Future<Response>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String path, {required Map<String, dynamic> data, APIType apiType = APIType.public, TokenType tokenType = TokenType.bearer, Map<String, dynamic>? headers, Map<String, dynamic>? query}) Future<Response>
post(String path, {required Map<String, dynamic> data, APIType apiType = APIType.public, TokenType tokenType = TokenType.bearer, bool isFormData = false, Map<String, dynamic>? headers, Map<String, dynamic>? query}) Future<Response>
put(String path, {required Map<String, dynamic> data, APIType apiType = APIType.public, TokenType tokenType = TokenType.bearer, bool isFormData = false, Map<String, dynamic>? headers, Map<String, dynamic>? query}) Future<Response>
toString() String
A string representation of this object.
inherited

Operators

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