CustomGradientContainer constructor

CustomGradientContainer({
  1. Key? key,
  2. dynamic gradient = const LinearGradient(begin: Alignment.centerLeft, end: Alignment.centerRight, stops: [0, 1], colors: [Color.fromRGBO(0, 0, 0, 0.2), Color.fromRGBO(0, 0, 0, 0)]),
  3. required Widget child,
  4. double strokeWidth = 5,
  5. VoidCallback? onPressed,
})

Implementation

CustomGradientContainer({
  super.key,
  gradient = const LinearGradient(
    begin: Alignment.centerLeft,
    end: Alignment.centerRight,
    stops: [0, 1],
    colors: [
      Color.fromRGBO(0, 0, 0, 0.2),
      Color.fromRGBO(0, 0, 0, 0),
    ],
  ),
  required this.child,
  this.strokeWidth = 5,
  this.onPressed,
}) : painter = CustomGradient(gradient: gradient, strokeWidth: strokeWidth);