From e75d23db9960c6060fd2b530f5878727e0caaf37 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 7 Mar 2026 11:45:34 +0100 Subject: Allow switching between pages This prepares manually starting the connection after server name insertion. --- lib/data.dart | 5 +++++ lib/ui.dart | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/data.dart b/lib/data.dart index 31e48b1..5e90b0e 100644 --- a/lib/data.dart +++ b/lib/data.dart @@ -123,4 +123,9 @@ class AppState with ChangeNotifier { return null; } } + + void togglePage() { + onConnectionPage = !onConnectionPage; + notifyListeners(); + } } diff --git a/lib/ui.dart b/lib/ui.dart index 20df8f5..73e532a 100644 --- a/lib/ui.dart +++ b/lib/ui.dart @@ -112,7 +112,20 @@ class ConnectionStatus extends StatelessWidget { text = const Text('Disconnected'); } - return ListTile(leading: icon, title: text); + return Row( + children: [ + Expanded( + child: ListTile( + leading: icon, + title: text, + trailing: ElevatedButton( + onPressed: state.togglePage, + child: const Text('switch view'), + ), + ), + ), + ], + ); }, ), ); -- cgit v1.3