CreateContentResponse.fromJson constructor

CreateContentResponse.fromJson(
  1. Map<String, Object?> json
)

Implementation

CreateContentResponse.fromJson(Map<String, Object?> json)
    : contentUri = ((json['content_uri'] as String).startsWith('mxc://')
          ? Uri.parse(json['content_uri'] as String)
          : throw Exception('Uri not an mxc URI')),
      unusedExpiresAt =
          ((v) => v != null ? v as int : null)(json['unused_expires_at']);