본문 바로가기
IT/Flutter

상태바 숨기기 (flutter)

by 성준하이 2023. 2. 11.
반응형

이전 포스팅에서 안드로이드 어플의 상단바 숨기는 법을 포스팅 하였다.

자세한 내용은 아래 참고 포스팅을 확인 바란다.

 

이번 포스팅에서는 flutter 에서의 상태바 숨기는 법을 공유한다.

 

스텝이 간단하다.

 

  • 해당 서비스 import
    • import 'package:flutter/services.dart';
  • 코드 명시
    • SystemChrome.setEnabledSystemUIOverlays([]);

기호에 따라 원하는 statusBar만 볼수도 있다.

SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]); // 상단 StatusBar 생성

SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); // 하단 StatusBar 생성

 

color 도 자유롭게 변경이 가능하다.

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( statusBarColor: // 원하는 색 ));

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( statusBarColor: Colors.transparent, // 투명색 ));

 


참고 포스팅

https://thenicesj.tistory.com/428

 

안드로이드 앱 타이틀바, 상태바 없애기

안드로이드 앱을 만들던 중 상단에 상태바와 타이틀 바가 보이면 이쁘지 않은 어플을 개발중이어서 없애는 방법을 알아내서 공유한다. app - res - values - thems - themes.xml 를 수정해주면 된다. false tr

thenicesj.tistory.com

 

반응형

'IT > Flutter' 카테고리의 다른 글

플러터 결과 미리보기(flutter_preview)  (6) 2023.01.21
flutter app bundle 서명 추가하는법  (38) 2022.10.31
flutter app bundle  (25) 2022.10.30
구글 개발자 계정 만들기  (18) 2022.10.18
app-release.apk 파일 생성 안될때  (2) 2022.10.16

댓글