i have customised Appbar with curved shape but how can i give gradient color to that area?
this is my Appbar code
appBar: AppBar(
elevation: 5.0,
backgroundColor: Colors.blue,
centerTitle: true,
shape: Cuvedshape(curveheights),
title: Container(
margin: EdgeInsets.only(top: 25),
child: Text("text",
textAlign: TextAlign.end,
style: TextStyle(
letterSpacing: 2,
fontSize: SizeConfig.safeBlockHorizontal * 8,
color: Colors.white,
fontFamily: Constants.FONT_ROBOTO,
fontWeight: FontWeight.bold))),
),
this is my shape code
class Cuvedshape extends ContinuousRectangleBorder {
const Cuvedshape(this.curveheights);
final double curveheights;
@override
Path getOuterPath(Rect rect, {TextDirection textDirection}) => Path()
..lineTo(0, rect.size.height)
..quadraticBezierTo(rect.size.width / 2,
rect.size.height + curveheights * 2, rect.size.width, rect.size.height)
..lineTo(rect.size.width, 0)
..close();
}