Files
uWinePortal/lib/entities/auth_token.dart
T
2025-07-11 14:10:39 +02:00

27 lines
532 B
Dart

class auth_token {
// Istanza privata statica
static final auth_token _instance = auth_token._internal();
// Variabile per salvare il token
String? _token;
// Costruttore privato
auth_token._internal();
// Factory per ritornare sempre la stessa istanza
factory auth_token() {
return _instance;
}
// Getter e setter per il token
String? get token => _token;
set token(String? value) {
_token = value;
}
// Metodo per cancellare il token (es. logout)
void clear() {
_token = null;
}
}