본문 바로가기

Flutter

플러터(Flutter) - Gradient Button

Container(
width: 180,
height: 45,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(80),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [Color(0xffFFAE88), Color(0xff8F93EA)],
),
),
child: MaterialButton(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: StadiumBorder(),
onPressed: () {},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Get Started',
style: TextStyle(color: Colors.white),
),
Icon(
Icons.arrow_forward,
color: Colors.white,
),
],
),
),
),
)