DirectLinkLocation.fromJson constructor

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

Constructs a DirectLinkLocation from the provided json.

Implementation

factory DirectLinkLocation.fromJson(Map<String, dynamic> json) =>
    switch (json['runtimeType']) {
      'DirectLinkLocationUser' => DirectLinkLocationUser.fromJson(json),
      'DirectLinkLocationGroup' => DirectLinkLocationGroup.fromJson(json),
      _ => throw UnimplementedError(json['runtimeType']),
    };