|
class GradientButton extends StatelessWidget { |
|
static const Color loginGradientStart = const Color(0xFFfbab66); |
|
static const Color loginGradientEnd = const Color(0xFFf7418c); |
|
|
|
static const LinearGradient primaryGradient = const LinearGradient( |
|
colors: [loginGradientStart, loginGradientEnd], |
|
stops: [0.0, 1.0], |
|
begin: Alignment.topCenter, |
|
end: Alignment.bottomCenter, |
|
); |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return Container( |
|
margin: EdgeInsets.only(top: 170.0), |
|
decoration: new BoxDecoration( |
|
borderRadius: BorderRadius.all(Radius.circular(5.0)), |
|
boxShadow: <BoxShadow>[ |
|
BoxShadow( |
|
color: loginGradientStart, |
|
offset: Offset(1.0, 6.0), |
|
blurRadius: 20.0, |
|
), |
|
BoxShadow( |
|
color: loginGradientEnd, |
|
offset: Offset(1.0, 6.0), |
|
blurRadius: 20.0, |
|
), |
|
], |
|
gradient: new LinearGradient( |
|
colors: [loginGradientEnd, loginGradientStart], |
|
begin: const FractionalOffset(0.2, 0.2), |
|
end: const FractionalOffset(1.0, 1.0), |
|
stops: [0.0, 1.0], |
|
tileMode: TileMode.clamp), |
|
), |
|
child: MaterialButton( |
|
highlightColor: Colors.transparent, |
|
splashColor: loginGradientEnd, |
|
//shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5.0))), |
|
child: Padding( |
|
padding: |
|
const EdgeInsets.symmetric(vertical: 10.0, horizontal: 42.0), |
|
child: Text( |
|
"LOGIN", |
|
style: TextStyle( |
|
color: Colors.white, |
|
fontSize: 25.0, |
|
fontFamily: "WorkSansBold"), |
|
), |
|
), |
|
onPressed: () {}), |
|
); |
|
} |
|
} |