added help screen

This commit is contained in:
Matic Ivešić 2026-02-08 20:51:13 +01:00
parent 7c47298cd7
commit c2ca8b59a3
7 changed files with 93 additions and 16 deletions

View File

@ -1,3 +1,12 @@
import java.util.Properties
import java.io.FileInputStream
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
plugins { plugins {
id("com.android.application") id("com.android.application")
id("kotlin-android") id("kotlin-android")
@ -6,7 +15,7 @@ plugins {
} }
android { android {
namespace = "com.example.quick_ssh" namespace = "com.moxibit.quick_ssh"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion ndkVersion = flutter.ndkVersion
@ -21,7 +30,7 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.quick_ssh" applicationId = "com.moxibit.quick_ssh"
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config. // For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion minSdk = flutter.minSdkVersion
@ -30,11 +39,18 @@ android {
versionName = flutter.versionName versionName = flutter.versionName
} }
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = keystoreProperties["storeFile"]?.let { file(it as String) }
storePassword = keystoreProperties["storePassword"] as String
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. signingConfig = signingConfigs.getByName("release")
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
} }
} }
} }

View File

@ -2,6 +2,7 @@
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC"/> <uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<application <application
android:label="QuickSSH" android:label="QuickSSH"

View File

@ -1,4 +1,4 @@
package com.example.quick_ssh package com.moxibit.quick_ssh
import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.android.FlutterFragmentActivity

45
lib/screens/help.dart Normal file
View File

@ -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),
);
}
}

View File

@ -8,6 +8,7 @@ import 'package:QuickSSH/screens/settings.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:QuickSSH/main.dart'; import 'package:QuickSSH/main.dart';
import 'package:QuickSSH/widgets/ad_banner.dart'; import 'package:QuickSSH/widgets/ad_banner.dart';
import 'package:QuickSSH/screens/help.dart';
class HomeScreen extends StatefulWidget { class HomeScreen extends StatefulWidget {
const HomeScreen({super.key}); const HomeScreen({super.key});
@ -75,13 +76,18 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
), ),
), ),
ListTile( InkWell(
title: Text( borderRadius: BorderRadius.circular(16),
"Help", onTap: _openHelp,
style: TextStyle( child: Padding(
color: theme.onSurface, padding: const EdgeInsets.all(8.0),
fontWeight: FontWeight.bold, child: Text(
fontSize: 20, "Help",
style: TextStyle(
color: theme.onSurface,
fontWeight: FontWeight.bold,
fontSize: 20,
),
), ),
), ),
), ),
@ -169,4 +175,13 @@ class _HomeScreenState extends State<HomeScreen> {
setState(() {}); setState(() {});
}); });
} }
_openHelp() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => HelpScreen()),
).then((_) {
setState(() {});
});
}
} }

View File

@ -12,7 +12,6 @@ class MyBannerAd extends StatefulWidget {
class _MyBannerAdState extends State<MyBannerAd> { class _MyBannerAdState extends State<MyBannerAd> {
BannerAd? _bannerAd; BannerAd? _bannerAd;
bool _isLoaded = false; bool _isLoaded = false;
bool _isInitializing = false;
@override @override
void initState() { void initState() {
@ -24,7 +23,8 @@ class _MyBannerAdState extends State<MyBannerAd> {
void _loadAd() async { void _loadAd() async {
_bannerAd = BannerAd( _bannerAd = BannerAd(
adUnitId: 'ca-app-pub-2626773788355001/7557216229', adUnitId:
'ca-app-pub-2626773788355001/7557216229', //adUnitId: 'ca-app-pub-2626773788355001/7557216229',
request: const AdRequest(), request: const AdRequest(),
size: AdSize.banner, size: AdSize.banner,
listener: BannerAdListener( listener: BannerAdListener(

View File

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1 version: 1.0.3+3
environment: environment:
sdk: ^3.9.2 sdk: ^3.9.2