QuickSSH/lib/screens/help.dart

60 lines
1.7 KiB
Dart

import 'package:flutter/material.dart';
class HelpScreen extends StatelessWidget {
const HelpScreen({super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context).colorScheme;
return Scaffold(
appBar: AppBar(
backgroundColor: theme.surface,
title: Text("Help", style: TextStyle(color: theme.onSurface)),
leading: Builder(
builder: (context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios_rounded, color: theme.onSurface),
onPressed: () {
Navigator.pop(context);
},
);
},
),
),
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),
);
}
}