fromJson static method

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

Implementation

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

  return PushMessageContentPoll(
    question: (json['question'] as String?) ?? '',
    isRegular: (json['is_regular'] as bool?) ?? false,
    isPinned: (json['is_pinned'] as bool?) ?? false,
  );
}