jonsaw/amazon-cognito-identity-dart

getSession might throw error when clockDrift not set in SharedPreferences

fhuonder opened this issue · 0 comments

Hi,

In cognito_user.dart (line 176) there is the code
final clockDrift = int.parse(await storage.getItem(clockDriftKey)) ?? 0;

When storage.getItem returns null it crashes.
I think the ?? 0 should either be within the brackets or int.tryParse should be used.

Regards,
Florian