getClientByUserId method

TdlibClient? getClientByUserId(
  1. int clientUserId
)

Implementation

TdlibClient? getClientByUserId(int clientUserId) {
  List<MapEntry<int, TdlibClient>> entries = clients.entries.toList();
  for (var i = 0; i < entries.length; i++) {
    if (entries[i].value.client_tg_user_id == clientUserId) {
      return entries[i].value;
    }
  }

  return null;
}