Pavel
Pavel

Reputation: 5866

Reset status bar color

I made status bar same color as app bar:

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
  statusBarColor: myAppBarColor,
));

But when I show a modal bottom sheet, status bar is displayed over the dark overlay:

I want to to shade status bar together with app bar. How do I reset status bar color back to default?

I tried passing statusBarColor: null (before showing modal bottom sheet) but it has no effect.

Upvotes: 0

Views: 1451

Answers (1)

Pavel
Pavel

Reputation: 5866

Make status bar color transparent (in main function):

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
  statusBarColor: Colors.transparent,
));

Upvotes: 2

Related Questions