fromJson static method

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

Implementation

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

  return TermsOfService(
    text: FormattedText.fromJson(tdMapFromJson(json['text'])),
    minUserAge: (json['min_user_age'] as int?) ?? 0,
    showPopup: (json['show_popup'] as bool?) ?? false,
  );
}