Change Navigation Bar Color In Flutter

In this article, you will learn How To Change Navigation Bar Color In Flutter. Importing Services From Flutter In order to change the Navigation Bar…

The post Change Navigation Bar Color In Flutter appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Jatin Hemnani

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

The post Change Navigation Bar Color In Flutter appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Jatin Hemnani


Print Share Comment Cite Upload Translate Updates
APA

Jatin Hemnani | Sciencx (2021-03-04T16:30:33+00:00) Change Navigation Bar Color In Flutter. Retrieved from https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/

MLA
" » Change Navigation Bar Color In Flutter." Jatin Hemnani | Sciencx - Thursday March 4, 2021, https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/
HARVARD
Jatin Hemnani | Sciencx Thursday March 4, 2021 » Change Navigation Bar Color In Flutter., viewed ,<https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/>
VANCOUVER
Jatin Hemnani | Sciencx - » Change Navigation Bar Color In Flutter. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/
CHICAGO
" » Change Navigation Bar Color In Flutter." Jatin Hemnani | Sciencx - Accessed . https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/
IEEE
" » Change Navigation Bar Color In Flutter." Jatin Hemnani | Sciencx [Online]. Available: https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/. [Accessed: ]
rf:citation
» Change Navigation Bar Color In Flutter | Jatin Hemnani | Sciencx | https://www.scien.cx/2021/03/04/change-navigation-bar-color-in-flutter/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.