getChatId static method

String getChatId({
  1. required String myId,
  2. required String friendId,
})

Implementation

static String getChatId({
  required final String myId,
  required final String friendId,
}) {
  final _result = myId.compareTo(friendId);
  if (_result > 0) {
    return '${myId}_$friendId';
  } else {
    return '${friendId}_$myId';
  }
}