ToggleParser constructor

ToggleParser(
  1. String name,
  2. String? description,
  3. String id,
  4. dynamic chosenValue,
  5. List<String> values,
  6. OnValueChanged? onValueChanged,
  7. bool isBeforeHeader,
  8. int index,
  9. Widget dateBuilder(
    1. int date
    )?,
)

Implementation

ToggleParser(
    this.name,
    this.description,
    this.id,
    this.chosenValue,
    this.values,
    this.onValueChanged,
    this.isBeforeHeader,
    this.index,
    this.dateBuilder) {
  onValueChangedLocal = (String id, dynamic value) async {
    chosenValue = value;
    if (onValueChanged != null) {
      return await onValueChanged!(id, value);
    }
    return Future.value(true);
  };
}