Server class

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

clearAuth({required String tokenKey}) Future<void>
Clear auth token and Dio instances — call on logout.
clearCache() Future<void>
Clear all cached API responses — call on logout.
init({required String baseUrl, required AuthStrategy authStrategy, String defaultVersion = '', Duration defaultCacheTtl = const Duration(minutes: 5), String? apiKey}) Future<void>
Initialise the entire server layer. Call once in main before runApp.
logout({required String tokenKey}) Future<void>
Full reset — cache + auth + cookies. Call on logout.