NetworkClient class
A utility class for handling HTTP requests with consistent error handling and configuration.
Constructors
- NetworkClient.new({required String baseUrl, required String apiKey, Client? client})
- Creates a new NetworkClient.
Properties
Methods
-
dispose(
) → void - Closes the HTTP client.
-
getJson(
String endpoint) → Future< Map< String, dynamic> > - Performs a GET request and returns the parsed JSON response.
-
getJsonList(
String endpoint) → Future< List> - Performs a GET request and returns the parsed JSON response as a list.
-
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