MessageAuthor.fromList constructor

MessageAuthor.fromList(
  1. List authorId
)

Implementation

factory MessageAuthor.fromList(List<dynamic> authorId) {
  final displayName = (authorId[1] as String).split(',');
  return MessageAuthor(
    id: authorId[0] as int,
    name: displayName.length > 1
        ? displayName[1].trim()
        : displayName[0].trim(),
    company: displayName.length > 1 ? displayName[0].trim() : null,
  );
}