appbar gradient flutter
AppBar(
flexibleSpace: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.yellow], stops: [0.5, 1.0],
),
),
),
),
appbar gradient flutter
AppBar(
flexibleSpace: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.cyan, Colors.yellow], stops: [0.5, 1.0],
),
),
),
),
color gradient in flutter
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.green, Colors.blue])
),
add gradient to flutter button
DecoratedBox(
decoration: BoxDecoration(gradient: LinearGradient(colors: [Colors.pink, Colors.green])),
child: ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(primary: Colors.transparent),
child: Text('Elevated Button'),
),
)
gradient elevated button flutter
buildElevatedButton() {
return Container(
width: 250,
child: ElevatedButton(
onPressed: (){},
style: ElevatedButton.styleFrom(
padding: EdgeInsets.all(0.0),
primary: Colors.transparent,
onPrimary: iconColors,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(80.0)),
),
child: Ink(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [Color(0xffe15084), Color(0xff245587)],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
borderRadius: BorderRadius.circular(30.0)
),
child: Container(
width: 300,
height: 50,
alignment: Alignment.center,
child: Text("Login", style: TextStyle(color: Colors.white),),
),
),
),
);
}
elevated button flutter form gradient
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Kindacode.com'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
print('Hi there');
},
style: ElevatedButton.styleFrom(
padding: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20))),
child: Ink(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [Colors.red, Colors.yellow]),
borderRadius: BorderRadius.circular(20)),
child: Container(
width: 300,
height: 100,
alignment: Alignment.center,
child: Text(
'Button',
style: TextStyle(fontSize: 24, fontStyle: FontStyle.italic),
),
),
),
),
),
);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us