UserManagementApi class

Example API for a hypothetical user management service

Inheritance

Constructors

UserManagementApi({required String method, required String url, int validStatusCode = 200, CacheOptions cacheOptions = const CacheOptions(cacheDuration: Duration.zero)})

Properties

cacheOptions CacheOptions
The configuration defining caching options.
finalinherited
defaultAuthOptions EndpointAuthOptions
The default authentication options for the endpoint.
finalinherited
dio Dio
The Dio instance used for making HTTP requests.
finalinherited
domainUrl String
The base URL for the API domain.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
method String
The HTTP method for the API endpoint (e.g., 'GET', 'POST', 'PUT').
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
The URL of the API endpoint.
no setterinherited
validStatusCode int
The valid status code expected from the API response.
finalinherited

Methods

call<T>({EndpointAuthOptions? authOptions, Map<String, dynamic>? queryParameters, Map<String, dynamic>? pathParameters, Object? data, Map<String, dynamic>? headers, T map(dynamic responseBody)?, EndpointErrorCallback? onError, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool isMultipart = false, bool ignoreCache = false, bool nullIfError = true}) FutureOr<T?>
Makes an API request to the endpoint and returns the parsed response of type T.
inherited
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

Static Methods

endpoints() Map<String, ApiEndpoint>