From c2ca8b59a309b7c938a4191f94c917b97ee2d07c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 Feb 2026 20:51:13 +0100 Subject: [PATCH] added help screen --- android/app/build.gradle.kts | 26 ++++++++--- android/app/src/main/AndroidManifest.xml | 1 + .../quick_ssh/MainActivity.kt | 2 +- lib/screens/help.dart | 45 +++++++++++++++++++ lib/screens/home_screen.dart | 29 +++++++++--- lib/widgets/ad_banner.dart | 4 +- pubspec.yaml | 2 +- 7 files changed, 93 insertions(+), 16 deletions(-) rename android/app/src/main/kotlin/com/{example => moxibit}/quick_ssh/MainActivity.kt (79%) create mode 100644 lib/screens/help.dart diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 1df1c4c..d5e51e5 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -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 { id("com.android.application") id("kotlin-android") @@ -6,7 +15,7 @@ plugins { } android { - namespace = "com.example.quick_ssh" + namespace = "com.moxibit.quick_ssh" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion @@ -21,7 +30,7 @@ android { defaultConfig { // 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. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion @@ -30,11 +39,18 @@ android { 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 { release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.getByName("debug") + signingConfig = signingConfigs.getByName("release") } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 91dfe0d..1c32f8a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ + { ), ), ), - 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 { setState(() {}); }); } + + _openHelp() { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => HelpScreen()), + ).then((_) { + setState(() {}); + }); + } } diff --git a/lib/widgets/ad_banner.dart b/lib/widgets/ad_banner.dart index 8f1bdfd..ae703b1 100644 --- a/lib/widgets/ad_banner.dart +++ b/lib/widgets/ad_banner.dart @@ -12,7 +12,6 @@ class MyBannerAd extends StatefulWidget { class _MyBannerAdState extends State { BannerAd? _bannerAd; bool _isLoaded = false; - bool _isInitializing = false; @override void initState() { @@ -24,7 +23,8 @@ class _MyBannerAdState extends State { void _loadAd() async { _bannerAd = BannerAd( - adUnitId: 'ca-app-pub-2626773788355001/7557216229', + adUnitId: + 'ca-app-pub-2626773788355001/7557216229', //adUnitId: 'ca-app-pub-2626773788355001/7557216229', request: const AdRequest(), size: AdSize.banner, listener: BannerAdListener( diff --git a/pubspec.yaml b/pubspec.yaml index c9bc01c..da4c42c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 # 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. -version: 1.0.0+1 +version: 1.0.3+3 environment: sdk: ^3.9.2