Skip to content

Commit f5a9dc4

Browse files
committed
fix(ssh page): Fix the issue of the virtual keyboard area being displayed within the security zone
Wrap the virtual keyboard area within the SafeArea to prevent it from being obscured by the system UI, and remove any unnecessary bottom padding
1 parent 25a3ab9 commit f5a9dc4

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

lib/view/page/ssh/page/page.dart

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -268,23 +268,26 @@ class SSHPageState extends ConsumerState<SSHPage>
268268
}
269269

270270
Widget _buildBottom() {
271-
return AnimatedPadding(
272-
padding: _media.viewInsets,
273-
duration: const Duration(milliseconds: 23),
274-
curve: Curves.fastOutSlowIn,
275-
child: Container(
276-
color: _terminalTheme.background,
277-
height: _virtKeysHeight + _media.padding.bottom,
278-
child: Consumer(
279-
builder: (context, ref, child) {
280-
final virtKeyState = ref.watch(virtKeyboardProvider);
281-
final virtKeyNotifier = ref.read(virtKeyboardProvider.notifier);
282-
283-
// Set the terminal input handler
284-
_terminal.inputHandler = virtKeyNotifier;
285-
286-
return _buildVirtualKey(virtKeyState, virtKeyNotifier);
287-
},
271+
return SafeArea(
272+
top: false,
273+
child: AnimatedPadding(
274+
padding: _media.viewInsets,
275+
duration: const Duration(milliseconds: 23),
276+
curve: Curves.fastOutSlowIn,
277+
child: Container(
278+
color: _terminalTheme.background,
279+
height: _virtKeysHeight,
280+
child: Consumer(
281+
builder: (context, ref, child) {
282+
final virtKeyState = ref.watch(virtKeyboardProvider);
283+
final virtKeyNotifier = ref.read(virtKeyboardProvider.notifier);
284+
285+
// Set the terminal input handler
286+
_terminal.inputHandler = virtKeyNotifier;
287+
288+
return _buildVirtualKey(virtKeyState, virtKeyNotifier);
289+
},
290+
),
288291
),
289292
),
290293
);

0 commit comments

Comments
 (0)