Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 433 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flutter toolbar overlapping below status bar

#1
I am wondering where the top edge of application starts in flutter. Look at the following hello world app:

[![enter image description here][1]][1]

The debug banner has gone below the status bar, which indicates that the top edge of my application starts from the edge of the screen. However, the application's `AppBar` has been place right after the status bar. This insconsistency is confusing me! Is the small part of application overlapped under status bar part of my application or not? Why is the `AppBar` not under status bar? How can I decide how my app should overlap with status bar? And what's the best practice here? Is overlapping the application header with status bar a good practice?

[1]:
Reply

#2
Actually, the appbar _is_ partially under the status bar. It just has an internal padding to handle it correctly


This is very clear when you remove the appbar :


Scaffold(
body: Text("Hello"),
)


In this situation, it will render "Hello" under the status bar.



You can fix this by wrapping your body into a `SafeArea` :



Scaffold(
body: SafeArea(
child: Text("Hello"),
),
),

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through