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
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.