fromJson static method

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

Implementation

static AnimatedChatPhoto? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return AnimatedChatPhoto(
    length: (json['length'] as int?) ?? 0,
    file: File.fromJson(json['file'] as Map<String, dynamic>?)!,
    mainFrameTimestamp:
        (json['main_frame_timestamp'] as num?)?.toDouble() ?? 0.0,
  );
}