플러터 Typography 와 Layout 만드는법

🐳ㅇㅡㄴㄱㅓ·2022년 4월 19일
0

플러터

목록 보기
4/24
post-thumbnail

글자에 스타일

  • Text() 위젯안엔 style 파라미터 넣을 수 있음
  • background, fontsize, fontweight 등등 css 할 때 선언해주는 그런 비슷한것들 다 쓸 수 있음.

색상 넣는법 세가지

color : Colors.red
color : Color.fromRGBO(20, 130, 80, 0.8)
color : Color(0xffff0000)

1) 미리 정해진 색상표에서 선택
2) RGB코드랑 투명도까지 넣는법
3) hex칼라로 고르는 방법 0xff 필수로 붙여야함

자주쓰는 Button 3가지

TextButton(child: Text('버튼'), onPressed: (){})
ElevatedButton(child: Text('버튼'), onPressed: (){})
IconButton(icon: Icon(), onPressed: (){})

생긴것만 다르고 이중에 골라쓰면 됨.
onPressed는 필수 요소 클릭 시 동작을 정의하는 함수

AppBar 디자인

AppBar(
	title : Text('앱제목'),
	leading : Icon(Icons.star),
	actions: [
		Icon(Icons.star),
		Icon(Icons.star)
	]
)

title : 제목
leading : 제목왼쪽 아이콘
actions : 제목 오른쪽 아이콘들

profile
재활훈련 중

0개의 댓글