SwitchTab constructor

const SwitchTab({
  1. Key? key,
  2. required dynamic onValueChanged(
    1. int
    ),
  3. required List<String> text,
  4. Color? backgroundColour = Colors.white,
  5. Color? thumbColor = Colors.lightBlueAccent,
  6. List<Widget>? icon,
  7. SwitchTabShape shape = SwitchTabShape.rounded,
  8. Color selectedTextColor = Colors.black,
  9. Color unselectedTextColor = Colors.black,
  10. TextStyle? style,
})

Implementation

const SwitchTab({
  Key? key,
  required this.onValueChanged,
  required this.text,
  this.backgroundColour = Colors.white,
  this.thumbColor = Colors.lightBlueAccent,
  this.icon,
  this.shape = SwitchTabShape.rounded,
  this.selectedTextColor = Colors.black,
  this.unselectedTextColor = Colors.black,
  this.style,
})  : assert(text.length <= 2, "Must not more than 2"),
      super(key: key);