mirror of
https://github.com/MoxiFoxi411/QuickSSH.git
synced 2026-11-08 19:34:55 +00:00
added help screen
This commit is contained in:
1 parent
7c47298cd7
commit
c2ca8b59a3
7 files changed
+93
-16
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HelpScreen extends StatelessWidget {
|
||||
const HelpScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Help')),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
_buildSectionTitle('Adding command'),
|
||||
_buildContent(
|
||||
'Click the bottom right + button to add a new command.',
|
||||
),
|
||||
_buildContent(
|
||||
'Enter the command name, host IP, username and the actual command to execute.',
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
_buildSectionTitle('Editing command'),
|
||||
_buildContent('Hold the command you want to edit.'),
|
||||
_buildContent('Change and update the data.'),
|
||||
const SizedBox(height: 24),
|
||||
_buildSectionTitle('Executing command'),
|
||||
_buildContent('Double tap the command you want to execute.'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSectionTitle(String title) {
|
||||
return Text(
|
||||
title,
|
||||
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildContent(String text) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text(text),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import 'package:QuickSSH/screens/settings.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:QuickSSH/main.dart';
|
||||
import 'package:QuickSSH/widgets/ad_banner.dart';
|
||||
import 'package:QuickSSH/screens/help.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
const HomeScreen({super.key});
|
||||
@@ -75,13 +76,18 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
"Help",
|
||||
style: TextStyle(
|
||||
color: theme.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: _openHelp,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
"Help",
|
||||
style: TextStyle(
|
||||
color: theme.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -169,4 +175,13 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
_openHelp() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => HelpScreen()),
|
||||
).then((_) {
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user