Skip to content

Instantly share code, notes, and snippets.

@bharat-1809
Created April 6, 2020 20:29
Show Gist options
  • Save bharat-1809/96c4d7bc15d0d0606fc4a69289ee9e91 to your computer and use it in GitHub Desktop.
Save bharat-1809/96c4d7bc15d0d0606fc4a69289ee9e91 to your computer and use it in GitHub Desktop.
Gradient Button in Flutter
RaisedButton(
onPressed: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(60),
),
padding: 0.0,
elevation: 10,
splashColor: Colors.lightBlue[100],
child: Ink(
decoration: new BoxDecoration(
borderRadius: BorderRadius.circular(60),
gradient: new LinearGradient(
colors: [Colors.blue[500], Colors.blue[900]],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
padding: EdgeInsets.symmetric(horizontal: 40, vertical: 20),
child: new Text("Gradient Rounded Button", style: TextStyle(
color: Colors.white,
)),
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment