SurveyOption constructor

SurveyOption({
  1. required String id,
  2. required String title,
  3. String? description,
  4. IconData? icon,
  5. TextAlign? textAlign = TextAlign.start,
})

Constructor for SurveyOption.

Parameters:

  • id: The unique identifier for the option.
  • title: The display title for the option.
  • description: An optional description for the option.
  • icon: An optional icon for the option.

Implementation

SurveyOption({
  required this.id,
  required this.title,
  this.description,
  this.icon,
  this.textAlign = TextAlign.start,
}) {
  if (description == null && icon == null) {
    textAlign = TextAlign.center;
  }
}