ApiConfig class

Represents the configuration for API requests.

This class encapsulates settings related to API communication, including the base URL and timeout duration for requests. It provides methods for converting between JSON and Dart objects for data persistence and serialization.

Constructors

ApiConfig({required String baseUrl, required int timeout})
Creates an ApiConfig instance.
ApiConfig.fromJson(Map<String, dynamic> json)
Creates an ApiConfig instance from a JSON map.
factory

Properties

baseUrl String
The base URL for API requests.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout int
The timeout duration for API requests in milliseconds.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this ApiConfig instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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