ApiManager class
A singleton class for managing API requests using Dio.
Constructors
- ApiManager.new()
-
Factory constructor that returns the single instance of ApiManager.
factory
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
-
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
Static Methods
-
get(
{required String methodName, required String bearerToken, required String privateKey}) → Future< ResponseAPI> -
Sends a
GET
request to the givenmethodName
with authentication headers. -
logMessage(
String message) → dynamic - Logs messages only in debug mode.
-
post(
{required String methodName, required Map< String, dynamic> params}) → Future<ResponseAPI> -
Sends a
POST
request to the givenmethodName
with the providedparams
.