Flutter

appbar 컬러 바꾸고 싶을 때 두가지 방법

Michelle Hwang 2021. 12. 15. 05:51

# AppBar 속성바꾸기

appBar: AppBar(
	title: Text('AppBar'),
    backgroundColor: Colors.white, // appbar color.
    foregroundColor: Colors.black, // appbar text color.
   ),

# 테마 이용하기 

ThemeData(
    primaryColor: Colors.white,
    appBarTheme: const AppBarTheme(
      iconTheme: IconThemeData(color: Colors.blue),
      backgroundColor: Colors.white,
      foregroundColor: Colors.black,
    ),
  ),

'Flutter' 카테고리의 다른 글

debug 뱃지가 거슬릴때  (0) 2021.12.15
이미지 모서리 둥글게 만들기 - ClipRRect  (0) 2021.12.14
비율 정하기 - AspectRatio  (0) 2021.12.14
폰트 적용하기  (0) 2021.12.14
TimePicker 예제  (0) 2021.06.26