ApiHelper class
Methods
-
addPath(ApiHelperPathItem item)
→ void
-
-
get(String key, {Map<String, dynamic>? query, String? token})
→ Future<Response>
-
-
getPathItem(String key)
→ ApiHelperPathItem
-
-
init({required String baseUrl, String? token, List<ApiHelperPathItem>? paths, Response resolver(dynamic)?, int timeout = 30000})
→ void
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
overrideDio(Dio dio)
→ void
-
Inject custom Dio (useful for mocking)
-
post(String key, {dynamic data, String? token, String? contentType})
→ Future<Response>
-
-
request(ApiHelperPathItem item, {String? token, String? contentType})
→ Future<Response>
-
-
setBaseUrl(String url)
→ void
-
Set global base URL
-
setToken(String? token)
→ void
-
Set global token
-
toString()
→ String
-
A string representation of this object.
inherited