Flutter

Change Navigation Bar Color In Flutter


In this article, you will learn How To Change Navigation Bar Color In Flutter.

Importing Services From Flutter

import 'package:flutter/services.dart';

In order to change the Navigation Bar Color, you need to import the Services package from Flutter.

Changing Color

void main() {
  runApp(MyApp());
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
    systemNavigationBarColor: Colors.greenAccent,
  ));
}

To change color you have to use SystemChrome function with setSystemUIOverlayStyle() method, it takes SystemUiOverlayStyle() as parameter. After that, there is a property i.e systemNavigationBarColor and you can specify the color according to your need.

Result


Share on social media

//