getUserIdByReference method

Future<Channel?> getUserIdByReference(
  1. String reference
)

Implementation

Future<Channel?> getUserIdByReference(String reference) async {
  final user = await getUserByReference(reference);
  if (user == null) return null;
  return _users.entries.firstWhereOrNull((e) => e.value == user)?.key;
}