Open brunohenriquy opened 5 years ago
Could you maybe provide a screenshot?
Could you maybe provide a screenshot?
I know It's an Android Pattern. But I was wondering if there is a way of hacking it, to become the same as on iOS.
Could you maybe try this? It should work with the gradient app bar. https://stackoverflow.com/questions/49015038/removing-the-drop-shadow-from-a-scaffold-appbar-in-flutter
Could you maybe try this? It should work with the gradient app bar. https://stackoverflow.com/questions/49015038/removing-the-drop-shadow-from-a-scaffold-appbar-in-flutter
The elevation adds a shadow between the AppBar and the Page Content:
With elevation:
Without elevation:
I am talking about the difference in colors 1 and 2 on Android:
Oh well, in the screenshot it looked like it dissapeard. Maybe a little hacky, but it would work, setting the status bar the same color as your primary color in your themedata. https://stackoverflow.com/questions/52489458/how-to-change-status-bar-color-in-flutter
Oh well, in the screenshot it looked like it dissapeard. Maybe a little hacky, but it would work, setting the status bar the same color as your primary color in your themedata. https://stackoverflow.com/questions/52489458/how-to-change-status-bar-color-in-flutter
That's because that's an iOS simulator, on iOS it gets the same Color.
Even setting the same color on themedata, it will show darker on Android, that's where I would like to find maybe a deep hack to override it.
Hmmmmm, interesting
Add this code in your main.dart or in the class file where you have declared your MaterialApp() to hide the black shadow or elevation shown on the status bar in Android:
@override
void initState() {
super.initState();
// set the status bar to transparent on android, to remove the black shadows
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // transparent or any color of your choice
statusBarIconBrightness: Brightness.dark, // Brightness.dark = White icons and text color for status bar ; Brightness.light for dark icons and text color
));
}
Is there any way to remove this darkness in the Android Status Bar?