ChannelCapabilities.fromJson constructor

ChannelCapabilities.fromJson(
  1. Map<String, dynamic> json
)

Create from JSON.

Implementation

factory ChannelCapabilities.fromJson(Map<String, dynamic> json) {
  return ChannelCapabilities(
    text: json['text'] as bool? ?? true,
    richMessages: json['richMessages'] as bool? ?? false,
    attachments: json['attachments'] as bool? ?? false,
    reactions: json['reactions'] as bool? ?? false,
    threads: json['threads'] as bool? ?? false,
    editing: json['editing'] as bool? ?? false,
    deleting: json['deleting'] as bool? ?? false,
    typingIndicator: json['typingIndicator'] as bool? ?? false,
    maxMessageLength: json['maxMessageLength'] as int?,
  );
}