fix: avoid display cutout in fullscreen mode

This commit is contained in:
lollipopkit
2023-08-29 10:38:57 +08:00
parent 2062bf082d
commit 57b72ae440
5 changed files with 30 additions and 23 deletions

View File

@@ -11,6 +11,7 @@ extension LocaleX on Locale {
extension String2Locale on String {
Locale? get toLocale {
// Issue #151
if (isEmpty) {
return null;
}

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 508;
static const int build = 510;
static const String engine = "3.13.1";
static const String buildAt = "2023-08-28 19:31:32.616141";
static const int modifications = 2;
static const String buildAt = "2023-08-29 10:32:08.906333";
static const int modifications = 4;
}

View File

@@ -83,7 +83,11 @@ class _FullScreenPageState extends State<FullScreenPage> with AfterLayoutMixin {
final offset = Offset(_offset, _offset);
return Scaffold(
body: SafeArea(
child: ValueListenableBuilder<int>(
child: Padding(
// Avoid display cutout
// `_screenWidth * 0.03` is the offset value
padding: EdgeInsets.all(_screenWidth * 0.03),
child: ValueListenableBuilder<int>(
valueListenable: _setting.fullScreenRotateQuarter.listenable(),
builder: (_, val, __) {
_rotateQuarter = val;
@@ -103,7 +107,9 @@ class _FullScreenPageState extends State<FullScreenPage> with AfterLayoutMixin {
),
),
);
}),
},
),
),
),
);
}