ChatInfoAction.fromJson constructor

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

Constructs a ChatInfoAction from the provided json.

Implementation

factory ChatInfoAction.fromJson(
  Map<String, dynamic> json,
) => switch (json['runtimeType']) {
  'ChatInfoActionAvatarUpdated' => ChatInfoActionAvatarUpdated.fromJson(json),
  'ChatInfoActionCreated' => ChatInfoActionCreated.fromJson(json),
  'ChatInfoActionMemberAdded' => ChatInfoActionMemberAdded.fromJson(json),
  'ChatInfoActionMemberRemoved' => ChatInfoActionMemberRemoved.fromJson(json),
  'ChatInfoActionNameUpdated' => ChatInfoActionNameUpdated.fromJson(json),
  _ => throw UnimplementedError(json['runtimeType']),
};