bottom_sheet: Clarify doc about behavior when useSafeArea is false (#134793)
As discussed at https://github.com/flutter/flutter/pull/122225#issuecomment-1690729628, this is a docs change meant to help people in the absence of a fix for #121752, which is being closed as WONTFIX.
This commit is contained in:
parent
77779d3603
commit
a88a2503ae
@ -792,8 +792,10 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {
|
|||||||
/// dragged up and down and dismissed by swiping downwards.
|
/// dragged up and down and dismissed by swiping downwards.
|
||||||
///
|
///
|
||||||
/// The [useSafeArea] parameter specifies whether the sheet will avoid system
|
/// The [useSafeArea] parameter specifies whether the sheet will avoid system
|
||||||
/// intrusions on the top, left, and right. If false, no SafeArea is added
|
/// intrusions on the top, left, and right. If false, no [SafeArea] is added;
|
||||||
/// and the top padding is consumed using [MediaQuery.removePadding].
|
/// and [MediaQuery.removePadding] is applied to the top,
|
||||||
|
/// so that system intrusions at the top will not be avoided by a [SafeArea]
|
||||||
|
/// inside the bottom sheet either.
|
||||||
/// Defaults to false.
|
/// Defaults to false.
|
||||||
///
|
///
|
||||||
/// The optional [backgroundColor], [elevation], [shape], [clipBehavior],
|
/// The optional [backgroundColor], [elevation], [shape], [clipBehavior],
|
||||||
@ -979,8 +981,14 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
|
|||||||
/// If true, a [SafeArea] is inserted to keep the bottom sheet away from
|
/// If true, a [SafeArea] is inserted to keep the bottom sheet away from
|
||||||
/// system intrusions at the top, left, and right sides of the screen.
|
/// system intrusions at the top, left, and right sides of the screen.
|
||||||
///
|
///
|
||||||
/// If false, the bottom sheet isn't exposed to the top padding of the
|
/// If false, the bottom sheet will extend through any system intrusions
|
||||||
/// MediaQuery.
|
/// at the top, left, and right.
|
||||||
|
///
|
||||||
|
/// If false, then moreover [MediaQuery.removePadding] will be used
|
||||||
|
/// to remove top padding, so that a [SafeArea] widget inside the bottom
|
||||||
|
/// sheet will have no effect at the top edge. If this is undesired, consider
|
||||||
|
/// setting [useSafeArea] to true. Alternatively, wrap the [SafeArea] in a
|
||||||
|
/// [MediaQuery] that restates an ambient [MediaQueryData] from outside [builder].
|
||||||
///
|
///
|
||||||
/// In either case, the bottom sheet extends all the way to the bottom of
|
/// In either case, the bottom sheet extends all the way to the bottom of
|
||||||
/// the screen, including any system intrusions.
|
/// the screen, including any system intrusions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user