From a45a1954e70e7e205de359dae05ddcd6692c34f4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 16:30:50 +0000 Subject: [PATCH] Add iOS-style circular back button to terminal page Co-authored-by: rustdesk <71636191+rustdesk@users.noreply.github.com> --- flutter/lib/mobile/pages/terminal_page.dart | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/flutter/lib/mobile/pages/terminal_page.dart b/flutter/lib/mobile/pages/terminal_page.dart index d4aa34425..73523415b 100644 --- a/flutter/lib/mobile/pages/terminal_page.dart +++ b/flutter/lib/mobile/pages/terminal_page.dart @@ -196,6 +196,8 @@ class _TerminalPageState extends State ), ), if (_showTerminalExtraKeys) _buildFloatingKeyboard(), + // iOS-style circular back button in top-right corner + if (isIOS) _buildBackButton(), ], ), ); @@ -246,6 +248,37 @@ class _TerminalPageState extends State return scaffold; } + Widget _buildBackButton() { + return Positioned( + top: 16, // iOS standard margin + right: 16, // iOS standard margin + child: SafeArea( + child: Container( + width: 44, // iOS standard tap target size + height: 44, + decoration: BoxDecoration( + color: Colors.black.withOpacity(0.5), // Half transparency + shape: BoxShape.circle, + ), + child: Material( + color: Colors.transparent, + child: InkWell( + borderRadius: BorderRadius.circular(22), + onTap: () { + clientClose(sessionId, _ffi); + }, + child: Icon( + Icons.chevron_left, // iOS-style back arrow + color: Colors.white, + size: 28, + ), + ), + ), + ), + ), + ); + } + Widget _buildFloatingKeyboard() { return AnimatedPositioned( duration: const Duration(milliseconds: 200),