getListOfFailedAttempts method

  1. @override
Future<List<DateTime>> getListOfFailedAttempts({
  1. required UserId userId,
})
override

Gets a list of DateTime timestamps of all the previous failed authentication attempts (i.e., times when a wrong pincode was entered)

Implementation

@override
Future<List<DateTime>> getListOfFailedAttempts({
  required UserId userId,
}) async {
  final list = sp.getStringList(_keyListFailedAttempts(userId).value);
  if (list == null) {
    return <DateTime>[];
  }
  return list.map((e) => DateTime.parse(e)).toList();
}