Issue
Seeing the following error on setSystemUIOverlayStyle.
Do I have to add some package to pubspec.yaml?
Solution
You can set the StatusBar transparent by adding this in your main()
:
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarColor: Colors.transparent));
The problem is that you are putting it inside your runApp()
.
Your main()
should look like this:
void main() {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarColor: Colors.transparent));
runApp(const MyApp());
}
Answered By - Dani3le_
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.