getOneByLogin method
Implementation
@override
Future<AccountV1?> getOneByLogin(String? correlationId, String login) async {
var item =
items.isNotEmpty ? items.where((item) => item.login == login) : null;
if (item != null && item.isNotEmpty && item.first != null) {
logger.trace(correlationId, 'Found account by %s', [login]);
} else {
logger.trace(correlationId, 'Cannot find account by %s', [login]);
}
if (item != null && item.isNotEmpty && item.first != null) {
return item.first;
} else {
return null;
}
}