develop/Flutter

[Flutter] BoxShape 종류

방뎁 2022. 11. 3. 23:30
반응형

 

box shape 종류에는 무엇이 있을까

 

https://api.flutter.dev/flutter/painting/BoxShape.html

 

BoxShape enum - painting library - Dart API

The shape to use when rendering a Border or BoxDecoration. Consider using ShapeBorder subclasses directly (with ShapeDecoration), instead of using BoxShape and Border, if the shapes will need to be interpolated or animated. The Border class cannot interpol

api.flutter.dev

 

문서에 나와 있듯 

1. 직사각형 

 

2. 원 

 

3. 을 적고 싶지만

이 두 가지뿐이다... 

 

그렇다면, 다양한 모양은 어떻게 구현하는 걸까...

radius를 조정해서 한다.. 

 

뭔가 swift처럼 다양한 쉐입을 지원해줄지 알았는데, 너무 허무했다. 

 

그래서 공식 문서를 잘 못 읽은 줄 알고 한참을 다시 보았다. 

 

하지만 역시... 두 가지뿐이고 나머지는 모서리를 감도를 조정해야 한다. 

 

이건 디자인 가이드에 따라 참고하면 될 것 같다... 

 

반응형