Closed Kassan424kh closed 3 years ago
Hi @Kassan424kh
With using master 1.18.0-9.0.pre.122
I can see intended result with Android 9-10, iOS 13.4.
Could you provide a complete minimal code sample to reproduce?
hello @VladyslavBondarenko ,
my complete code is:
ok I switched to one version previou 1.18.0-8.0.pre
it works without any problem
@Kassan424kh could you provide a minimal and complete reproducible code sample, such that I can copy and run?
Hy @VladyslavBondarenko,
surry about the long code, I added to your code only this:
...
@override
void initState() {
SystemChrome.setEnabledSystemUIOverlays([]);
}
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
return Scaffold(
...
after added it, the problem displayed again on all master versions after 1.18.0-8.0.pre
version.
Hi @Kassan424kh
I see you are calling setPreferredOrientations
inside the build
function before return
just tested this code in master and works as intended
does this solution solve the problem for you?
Thank you
Hy again,
sorry because I didn't have internet I cannot answer in the last few days,
@iapicca thanks for your code, but the problem is still dosent works,
i think my bug would shown because i useSystemChrome.setEnabledSystemUIOverlays([]);
in my code, but i don't know how can this be fexid 😥.
It's a way to get the height of the statusbar?
Hi @Kassan424kh As mentioned before the issue depends from your implementation rather than Flutter itself This platform is not meant for assistance on personal code. Please see https://flutter.dev/community for resources and asking questions like this, you may also get some help if you post it on Stack Overflow. Closing, as this isn't an issue with Flutter itself, if you disagree please write in the comments and I will reopen it Thank you
Hi @iapicca,
but this is not only on code I writed, after add "SystemChrome.setEnabledSystemUIOverlays([]);" to any flutter project, cann't MediaQuery.of(context).padding.top
works more, this is the problem I have.
Hi @Kassan424kh
did you try the code sample provided?
You may want to avoid running function that cause the widget to rebuild
inside initState()
and in build()
(before return
);
your sample code
doesn't have any reference to Mediaquery.of(...)
.
This platform is meant to contribute to flutter reporting bugs and providing new features, your request seems oriented to solve the problem in your code, for that please address the community Thank you
Hi @iapicca
doesn't have any reference to Mediaquery.of(...).
SafeArea use MediaQuery.of(context).padding.top
to get the height of the Notch/Statusbar.
Hi @Kassan424kh does the the code sample provided work for you? Thank you
Hi @iapicca no thank you
@Kassan424kh
I see this result without using SystemChrome.setEnabledSystemUIOverlays([]);
And this result with using SystemChrome.setEnabledSystemUIOverlays([]);
On Pixel 3 XL Android 10 (API 29) (emulator), the same for current dev 1.19.0-1.0.pre
and stable 1.17.1
.
Trying to reproduce your issue I'm experiencing another issue https://github.com/flutter/flutter/issues/46486.
Are you experiencing having content out of safe area with different devices? what emulator do you use?
Hi @VladyslavBondarenko ,
Are you experiencing having content out of safe area with different devices?
no and yes in some projectes yes another not
what emulator do you use?
Galaxy note 10 +
Thank you
@Kassan424kh
With this code @TahaTesser confirmed with Galaxy M30 (Android 10) he faced the same result as you .
Without SystemChrome.setEnabledSystemUIOverlays([]);
on current dev 1.19.0-1.0.pre
With SystemChrome.setEnabledSystemUIOverlays([]);
on current dev 1.19.0-1.0.pre
.
(With my Redmi Note 7 (Android 9) with nothch on the screen I can see the same result as on the last image, unlike Galaxy M30)
WithSystemChrome.setEnabledSystemUIOverlays([]);
on current stable 1.17.1
Hi @VladyslavBondarenko,
is here any update?
thanks
/cc @xster Do you know if anything recently changed in how the engine reports window.padding for notched android devices?
@GaryQian could you take a look at this issue?
same issue
Hi @sanekyy @Kassan424kh
Tried on Galaxy M30, the safe area seems to work on the latest sable
and the master
channels
Please try code sample on the latest stable
channel
Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v
.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
cann't enable the top area on my app, like before the last master flutter upgrade.
link to image how it looks like now