Dev/Flutter

Flutter - border 적용

healthyryu 2021. 11. 24. 18:28

https://stackoverflow.com/a/53680045/3897810

 

How can I add a border to a widget in Flutter?

I'm using Flutter and I'd like to add a border to a widget (in this case, a Text widget). I tried TextStyle and Text, but I didn't see how to add a border.

stackoverflow.com

Container(
  decoration: BoxDecoration(
  border: Border.all(width: 1),
  borderRadius: const BorderRadius.all(Radius.circular(5))),
  child: ...
)

 

반응형