Reputation: 4119
See image below, there is a semi transparent nav type bar by default when starting a fresh app on flutter dev that I wish to remove with no idea where to look in the docs.
Upvotes: 2
Views: 231
Reputation: 1
First of all import 'package:flutter/services.dart';
Then where you need you can write the below code. Also, if you need throughout the app the you can write it in void main()
.
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarBrightness: Brightness.light,
statusBarIconBrightness: Brightness.light,
statusBarColor: Colors.transparent,
));
Depending on your need you can change Brightness for statusBar as well as its icons.
Upvotes: 0
Reputation: 777
You can either set its color to transparent like this:
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,);
Or you can hide it completely like this:
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
Upvotes: 2