startDirectChat method

Future<String> startDirectChat({
  1. bool? enableEncryption,
  2. List<StateEvent>? initialState,
  3. bool waitForSync = true,
})

Returns an existing direct chat ID with this user or creates a new one. Returns null on error.

Implementation

Future<String> startDirectChat({
  bool? enableEncryption,
  List<StateEvent>? initialState,
  bool waitForSync = true,
}) async =>
    room.client.startDirectChat(
      id,
      enableEncryption: enableEncryption,
      initialState: initialState,
      waitForSync: waitForSync,
    );