-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Please add gradient property for ElevatedButton.
It's very often needed to paint a button filled with gradient, so strange we still didn't have it out of the box.
Currently we have to use complicated workarounds to achieve this effect:
https://www.kindacode.com/article/flutter-create-gradient-background-buttons/
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),
),
),
),
),AhmedLSayed9
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team