David van Dugteren
David van Dugteren

Reputation: 4119

How do I remove the navbar in Flutter for Android

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.

The problem

Upvotes: 2

Views: 231

Answers (2)

Vaishnav Datir
Vaishnav Datir

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

David Sedlář
David Sedlář

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

Related Questions