플러터(Flutter)/플러터 위젯(Flutter Widget)
CircleAvatar
SuperKid
2020. 3. 18. 16:07
[Ko]
- 이미지를 원형 모양 안에 넣기 : CircleAvatar widget 사용
- images directory를 새로 만들고 aaa.png를 다운로드 받아서 images directory에 넣고 pubspec.yaml에 assets를 등록
assets:
- images/cactus.png
CircleAvatar(
radius: 50.0,
backgroundColor: Colors.grey,
backgroundImage: AssetImage('images/aaa.png'),
)
[En]
- Put the image in a circular shape: use the CircleAvatar widget
- Create a new images directory, download aaa.png, put it in the images directory and register assets in pubspec.yaml
assets:
- images/cactus.png
CircleAvatar(
radius: 50.0,
backgroundColor: Colors.grey,
backgroundImage: AssetImage('images/aaa.png'),
)