Change Status Bar Color In Flutter
Posted on: March 03, 2021 by Jatin Hemnani
In this article you will learn How To Change Status Bar Color In Flutter.
Import Services
import 'package:flutter/services.dart';
To change the Status Bar color you need to import Services from Flutter.
Changing The Status Bar Color
void main() {
runApp(MyApp());
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.purple,
));
}
To change the Status Bar Color you have to use the SystemChrome function with the setSystemUIOverlayStyle method, after that, it takes SystemUiOverlayStyle() as a parameter, and then you can use the statusBarColor property and specify the color.
Result
Share on social media
//