NetworkService class abstract

Protocol defining the network service interface.

Matches iOS NetworkService protocol. Allows for environment-based implementations (real vs mock).

Implementers

Constructors

NetworkService()

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

get<T>(APIEndpoint endpoint, {required bool requiresAuth, required T fromJson(Map<String, dynamic>)}) Future<T>
Perform a GET request with typed response.
getRaw(APIEndpoint endpoint, {required bool requiresAuth}) Future<Uint8List>
Perform a raw GET request (returns raw bytes).
getWithPath<T>(String path, {required bool requiresAuth, required T fromJson(Map<String, dynamic>)}) Future<T>
Perform a GET with custom path (for parameterized endpoints).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post<T>(APIEndpoint endpoint, Object payload, {required bool requiresAuth, required T fromJson(Map<String, dynamic>)}) Future<T>
Perform a POST request with typed payload and response.
postRaw(APIEndpoint endpoint, Uint8List payload, {required bool requiresAuth}) Future<Uint8List>
Perform a raw POST request (returns raw bytes).
postWithPath<T>(String path, Object payload, {required bool requiresAuth, required T fromJson(Map<String, dynamic>)}) Future<T>
Perform a POST with custom path (for parameterized endpoints).
toString() String
A string representation of this object.
inherited

Operators

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