ApiClient class
Singleton Dio instance factory.
One instance per ApiVersion — all share the same auth strategy and
cookie jar. Instances are cached so repeated access is free.
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
-
init(
{required String baseUrl, required AuthStrategy authStrategy}) → void - Internal — called by Server.init.
-
instance(
String version) → Dio -
Returns the Dio instance for
version. Creates it on first access, returns cached instance thereafter. -
reset(
) → void - Discard all cached instances — useful after logout.