SessionCustomFieldsItem.fromJson constructor

SessionCustomFieldsItem.fromJson(
  1. Object? json
)

Implementation

factory SessionCustomFieldsItem.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SessionCustomFieldsItem(
    dropdown: map['dropdown'] == null
        ? null
        : SessionDropdown.fromJson(map['dropdown']),
    key: (map['key'] as String),
    label: SessionLabel.fromJson(map['label']),
    numeric: map['numeric'] == null
        ? null
        : SessionNumeric.fromJson(map['numeric']),
    optional: map['optional'] == null ? null : (map['optional'] as bool),
    text: map['text'] == null ? null : SessionNumeric.fromJson(map['text']),
    type: PaymentLinksResourceCustomFieldsType.fromJson(map['type']),
  );
}