mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: the keyboard blocked the content of bottom sheet (#4706)
* fix: the keyboard blocked the content of bottom sheet * chore: apply suggestion Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com> --------- Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
This commit is contained in:
parent
c06a0346d8
commit
ef83688907
@ -120,9 +120,12 @@ Future<T?> showMobileBottomSheet<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ----- content area -----
|
// ----- content area -----
|
||||||
|
// make sure the keyboard won't cover the content
|
||||||
children.add(
|
children.add(
|
||||||
Padding(
|
Padding(
|
||||||
padding: padding,
|
padding: padding.copyWith(
|
||||||
|
bottom: padding.bottom + MediaQuery.of(context).viewInsets.bottom,
|
||||||
|
),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -133,6 +136,8 @@ Future<T?> showMobileBottomSheet<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add default padding
|
// add default padding
|
||||||
|
// for full screen bottom sheet, the padding should be 16.0
|
||||||
|
// for non full screen bottom sheet, the padding should be 28.0
|
||||||
children.add(
|
children.add(
|
||||||
VSpace(MediaQuery.of(context).padding.bottom == 0 ? 28.0 : 16.0),
|
VSpace(MediaQuery.of(context).padding.bottom == 0 ? 28.0 : 16.0),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user