hcGradient function

Gradient hcGradient([
  1. Color secondGradientColor = hcSecondColor,
  2. Color firstGradientColor = hcPrimaryColor,
  3. AlignmentGeometry begin = Alignment.topCenter,
  4. AlignmentGeometry end = Alignment.bottomCenter,
])

returns gradient

Implementation

Gradient hcGradient(
    [Color secondGradientColor = hcSecondColor,
    Color firstGradientColor = hcPrimaryColor,
    AlignmentGeometry begin = Alignment.topCenter,
    AlignmentGeometry end = Alignment.bottomCenter]) {
  return LinearGradient(
    colors: [
      secondGradientColor,
      firstGradientColor,
    ],
    //stops: [0, 1],
    begin: begin,
    end: end,
  );
}