Flutter
[j Flutter] 상단(AppBar) 뒤로가기 버튼 색상변경 & 아이콘 변경
simpleyj
2020. 5. 27. 17:01
728x90
반응형
- 뒤로가기 버튼색을 변경하는 경우
main.dart에서 AppBar -> iconTheme 속성을 사용.
appBar: AppBar(
iconTheme: IconThemeData(
color: Colors.black,//색변경
),
title: Text("Main"),
centerTitle: true,
),
- 특정 뒤로가기 버튼색을 변경 & 뒤로가기를 눌렀을 때 동작지정하는 경우 , 뒤로가기 버튼모양도 바꿔줄수있다.
appBar: AppBar(
title: Text('Main'),
leading: IconButton(
onPressed: () {
Navigator.pop(context); //뒤로가기
},
color: Colors.purple,
icon: Icon(Icons.arrow_back)),
) ,
출처 :
flutter — 앱바 뒤로 버튼 색상을 변경하는 방법
AppBar의 자동 뒤로 버튼을 다른 색상으로 변경하는 방법을 알 수 없습니다. 비계 아래에서 그것을 연구하려고했지만 머리를 감쌀 수 없습니다. return Scaffold( appBar: AppBar( backgroundColor: Colors.white, tit
www.it-swarm.dev
728x90
반응형