PowerSyncCredentials.fromJson constructor
Implementation
factory PowerSyncCredentials.fromJson(Map<String, dynamic> parsed) {
String token = parsed['token'];
DateTime? expiresAt = getExpiryDate(token);
return PowerSyncCredentials(
endpoint: parsed['endpoint'],
token: parsed['token'],
userId: parsed['user_id'],
expiresAt: expiresAt);
}