return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
backgroundColor: Colors.transparent,
shadowColor: Colors.transparent,
),
extendBodyBehindAppBar: true,
...
이때 핸드폰의 상태 색상을 변경해야한다면
import 'package:flutter/services.dart';
AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
// Status bar color
statusBarColor: Colors.red,
// Status bar brightness (optional)
statusBarIconBrightness: Brightness.dark, // For Android (dark icons)
statusBarBrightness: Brightness.light, // For iOS (dark icons)
),
)
뒤로가기 버튼 색상도 바꾸려면
AppBar(
iconTheme: IconThemeData(
color: Colors.black, //change your color here
),
systemOverlayStyle: const SystemUiOverlayStyle(
// Status bar color
// statusBarColor: Colors.red,
// Status bar brightness (optional)
statusBarIconBrightness: Brightness.dark, // For Android (dark icons)
statusBarBrightness: Brightness.light, // For iOS (dark icons)
),
backgroundColor: Colors.transparent,
shadowColor: Colors.transparent,
https://stackoverflow.com/questions/52489458/how-to-change-status-bar-color-in-flutter
How to change status bar color in Flutter?
I am trying to change the status bar color to white. I found this pub on flutter. I tried to use the example code on my dart files.
stackoverflow.com
https://stackoverflow.com/questions/51508257/how-to-change-the-appbar-back-button-color
How to change the appBar back button color
I cannot figure out how to change the appBar's automatic back button to a different color. it's under a scaffold and I've tried to research it but I can't wrap my head around it. return Scaffold(...
stackoverflow.com
Update
위 방식보다 간단한 방식을 찾음
AppBar(
iconTheme: const IconThemeData(
color: Colors.black, //change your color here
),
backgroundColor: Colors.white24,
shadowColor: Colors.transparent,
title: Text(
'제목',
style: TextStyle(color: Colors.black),
),
),
728x90