INetworkClient class abstract

Interface for network operations.

All network operations return a sealed Result with AppError on failure so no raw exceptions reach the UI layer.

Constructors

INetworkClient()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, Map<String, String>? headers, T fromJson(dynamic)?}) → Future<Result<T, AppError>>
Performs a DELETE request.
get<T>(String path, {Map<String, dynamic>? queryParameters, Map<String, String>? headers, T fromJson(dynamic)?}) → Future<Result<T, AppError>>
Performs a GET request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, Map<String, String>? headers, T fromJson(dynamic)?}) → Future<Result<T, AppError>>
Performs a PATCH request.
post<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, Map<String, String>? headers, T fromJson(dynamic)?}) → Future<Result<T, AppError>>
Performs a POST request.
put<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, Map<String, String>? headers, T fromJson(dynamic)?}) → Future<Result<T, AppError>>
Performs a PUT request.
toString() → String
A string representation of this object.
inherited

Operators

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