How should I change the background color of the text and icon at the same time in a text button in flutter???? I used flat button before but the "vs code " editor said its deprecated.
TextButton(onPressed: (){}, child: Text("test"),style: ButtonStyle(
minimumSize: MaterialStateProperty.all(
Size(80, 29)),
padding: MaterialStateProperty.all(
EdgeInsets.zero),
backgroundColor:
MaterialStateProperty.all(
Color(0xFF3D7FFF))),)
TextButton(
child: Text('test'),
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.red)),
onPressed: () {},
),
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.