SharedFile.fromJson constructor

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

Implementation

SharedFile.fromJson(Map<String, dynamic> json)
    : value = json['value'] ?? json['path'],
      thumbnail = json['thumbnail'],
      duration = json['duration'],
      type = json['type'] is int
          ? SharedMediaType.values[json['type']]
          : SharedMediaType.OTHER,
      mimeType = json['mimeType'],
      message = json['message'];