CustomRadioButton constructor

CustomRadioButton({
  1. List<String>? buttonLables,
  2. List? buttonValues,
  3. dynamic radioButtonValue(
    1. dynamic,
    2. int
    )?,
  4. double? buttonWidth,
  5. Color? buttonColor,
  6. Color? selectedColor,
  7. double buttonHeight = 35,
  8. bool horizontal = false,
  9. bool enableShape = false,
  10. double elevation = 10,
  11. ShapeBorder? customShape,
  12. double fontSize = 15,
  13. double lineSpace = 5,
  14. double buttonSpace = 5,
  15. Color buttonBorderColor = const Color(0xFF2594B22B),
  16. Color unselectedButtonBorderColor = const Color(0xFF2594B22B),
  17. Color textColor = Colors.black,
  18. Color selectedTextColor = Colors.white,
  19. int initialSelection = 0,
})

Implementation

CustomRadioButton({
  this.buttonLables,
  this.buttonValues,
  this.radioButtonValue,
  this.buttonWidth,
  this.buttonColor,
  this.selectedColor,
  this.buttonHeight = 35,
  this.horizontal = false,
  this.enableShape = false,
  this.elevation = 10,
  this.customShape,
  this.fontSize = 15,
  this.lineSpace = 5,
  this.buttonSpace = 5,
  this.buttonBorderColor = const Color(0xFF2594B22B),
  this.unselectedButtonBorderColor = const Color(0xFF2594B22B),
  this.textColor = Colors.black,
  this.selectedTextColor = Colors.white,
  this.initialSelection=0,
})  : assert(buttonLables!.length == buttonValues!.length),
      assert(buttonLables!.length > initialSelection),
      assert(buttonColor != null),
      assert(selectedColor != null);