getClient method
Implementation
@override
Client? getClient() {
if (sharedPreferences.containsKey(clientKey)) {
final jsonString = sharedPreferences.getString(clientKey);
if (jsonString != null && jsonString.isNotEmpty) {
try {
final jsonMap = jsonDecode(jsonString);
return Client.fromJson(jsonMap);
} catch (e) {
print("Erreur de décodage JSON dans getClient: $e");
return null;
}
}
}
return null;
}