material button gradient flutter code example
Example 1: color gradient in flutter
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.green, Colors.blue])
),
Example 2: flutter floating action button gradient
floatingActionButton: FloatingActionButton(
child: Container(
width: 60,
height: 60,
child: Icon(Icons.add),
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(colors: [Colors.red, Colors.blue])),
),
onPressed: () {},
)