简体   繁体   中英

How to change the border highlight color of a outlinebutton in flutter?

How do you change the border highlight color of a outlinebutton in flutter? I can set the color normally but as soon as someone presses it changes to blue. I tried giving it a highlight color property but that didn't work.

You can set the highlightedBorderColor property of the OutlineButton :

OutlineButton(
  child: Text('Press'),
  highlightedBorderColor: Colors.red,
),

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM