This commit is contained in:
usbe committed 2025-07-11 14:10:39 +02:00
commit 6acec998bc
132 files changed
+5128

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
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;
}
}