AnimatedButton.strip constructor

AnimatedButton.strip({
  1. Key? key,
  2. required String text,
  3. required VoidCallback? onPress,
  4. bool isReverse = false,
  5. double height = 50,
  6. double width = double.infinity,
  7. StripTransitionType stripTransitionType = StripTransitionType.LEFT_TO_RIGHT,
  8. TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 20),
  9. Color selectedTextColor = Colors.blue,
  10. Color selectedBackgroundColor = Colors.white,
  11. int textMaxLine = 1,
  12. TextOverflow textOverflow = TextOverflow.clip,
  13. AlignmentGeometry textAlignment = Alignment.center,
  14. Duration animationDuration = const Duration(milliseconds: 500),
  15. Color backgroundColor = Colors.white60,
  16. Color stripColor = Colors.white,
  17. double stripSize = 6,
  18. ValueChanged<bool>? onChanges,
  19. Gradient? gradient,
  20. Gradient? selectedGradientColor,
  21. bool isSelected = false,
  22. String selectedText = '',
  23. AnimatedOn animatedOn = AnimatedOn.onTap,
})

Implementation

AnimatedButton.strip({
  Key? key,
  required this.text,
  required this.onPress,
  this.isReverse = false,
  this.height = 50,
  this.width = double.infinity,
  this.stripTransitionType = StripTransitionType.LEFT_TO_RIGHT,
  this.textStyle = const TextStyle(color: Colors.white, fontSize: 20),
  this.selectedTextColor = Colors.blue,
  this.selectedBackgroundColor = Colors.white,
  this.textMaxLine = 1,
  this.textOverflow = TextOverflow.clip,
  this.textAlignment = Alignment.center,
  this.animationDuration = const Duration(milliseconds: 500),
  this.backgroundColor = Colors.white60,
  this.stripColor = Colors.white,
  this.stripSize = 6,
  this.onChanges,
  this.gradient,
  this.selectedGradientColor,
  this.isSelected = false,
  this.selectedText = '',
  this.animatedOn = AnimatedOn.onTap,
})  : borderRadius = 0,
      borderWidth = 0,
      borderColor = Colors.transparent,
      transitionType = TransitionType.LEFT_TO_RIGHT,
      isStrip = true;