Flutter 투명 상태 표시 줄 및 글꼴 색상 설정 방법
1.main.dart 에 설정
void main(){
runApp(new MyApp());
if (Platform.isAndroid) {
// Android
SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(
statusBarColor: Colors.transparent, //
statusBarIconBrightness: Brightness.light
//light: dark:
// statusBarIconBrightness
);
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
}
}
2.단일 페이지 설정
appBar: AppBar(
title: new Text(''),
elevation: 0,
brightness: Brightness.dark, //
),
주:AppBar 를 설정 한 후 build 에 이 코드 를 단독으로 설정 하면 SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light)이 실 효 됩 니 다.ps:Flutter 수정 상태 표시 줄 색상 및 글꼴 색상
Flutter 몰입 식 상태 표시 줄
void main() {
runApp(MyApp());
if (Platform.isAndroid) {
// android 。 , set , , MaterialApp 。
SystemUiOverlayStyle systemUiOverlayStyle =
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
}
}
Flutter 상태 표시 줄 글꼴 색상 수정Annotated Region 패키지 Scaffold 를 사용 하면 상태 표시 줄 색상 을 변경 할 수 있 습 니 다.dark 와 light 두 가지 가 있 습 니 다.
@override
Widget build(BuildContext context) {
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: Material(child:Scaffold(),),);
}
여기 서 Flutter 투명 상태 표시 줄 및 글꼴 색상 에 관 한 글 을 소개 합 니 다.더 많은 Flutter 상태 표시 줄 글꼴 색상 내용 은 이전 글 을 검색 하거나 아래 글 을 계속 읽 어 주시 기 바 랍 니 다.앞으로 도 많은 응원 부탁드립니다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
콘텐츠 SaaS | 모바일 네이티브 개발용 Flutter SDK기본 모바일 지원을 위해 Bloomreach Content Flutter SDK로 시작하세요. Flutter는 단일 코드베이스에서 아름답고 고유하게 컴파일된 다중 플랫폼 애플리케이션을 빌드하기 위한 오픈 소스 프레임...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.