appendSessionName method

Future<String> appendSessionName(
  1. String name
)

Sets the session display name (newlines are sanitized away).

Implementation

Future<String> appendSessionName(String name) {
  final sanitized = name.replaceAll(RegExp(r'[\r\n]+'), ' ').trim();
  return _append(
    (id, parentId) => SessionInfoRecord(
      id: id,
      parentId: parentId,
      timestamp: DateTime.now(),
      name: sanitized,
    ),
    sealClass: 'session_name',
  );
}