Show actual app version in about section

This commit is contained in:
Elias Müller 2023-05-11 20:49:16 +02:00
parent d1ec0c5898
commit ad03c7f264
6 changed files with 42 additions and 22 deletions

View File

@ -54,7 +54,7 @@
<entry key="async"> <entry key="async">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.10.0/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.11.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -173,7 +173,7 @@
<entry key="characters"> <entry key="characters">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.2.1/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.3.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -208,7 +208,7 @@
<entry key="collection"> <entry key="collection">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.0/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -523,7 +523,7 @@
<entry key="js"> <entry key="js">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.7/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -579,7 +579,7 @@
<entry key="matcher"> <entry key="matcher">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.13/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.15/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -593,7 +593,7 @@
<entry key="meta"> <entry key="meta">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.8.0/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -632,10 +632,17 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="package_info">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_info-2.0.2/lib" />
</list>
</value>
</entry>
<entry key="path"> <entry key="path">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.2/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -936,7 +943,7 @@
<entry key="test_api"> <entry key="test_api">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.4.16/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.5.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -1106,7 +1113,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/archive-3.3.7/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/archive-3.3.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/asn1lib-1.4.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/asn1lib-1.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.10.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.11.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/back_button_interceptor-6.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/back_button_interceptor-6.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/badges-3.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/badges-3.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4/lib" />
@ -1123,12 +1130,12 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-2.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-2.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_web-1.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cached_network_image_web-1.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.2.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/checked_yaml-2.0.3/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/checked_yaml-2.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cli_util-0.4.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cli_util-0.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/code_builder-4.4.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/code_builder-4.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cookie_jar-3.0.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cookie_jar-3.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cross_file-0.3.3+4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cross_file-0.3.3+4/lib" />
@ -1169,7 +1176,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/intl-0.17.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/intl-0.17.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/jiffy-5.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/jiffy-5.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_annotation-4.8.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_annotation-4.8.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_serializable-6.6.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_serializable-6.6.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/linkify-4.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/linkify-4.1.0/lib" />
@ -1177,14 +1184,15 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/loader_overlay-2.2.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/loader_overlay-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/localstore-1.3.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/localstore-1.3.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.13/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.15/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.8.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/nested-1.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/nested-1.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-1.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-1.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_info-2.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.14/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.14/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.2/lib" />
@ -1226,7 +1234,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.4.16/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.5.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timetable_view-0.3.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timetable_view-0.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timing-1.0.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timing-1.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.1/lib" />

View File

@ -27,6 +27,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.6" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.6" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.7+3" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.7+3" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_info-2.0.2" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />

View File

@ -6,7 +6,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.2' classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
task clean(type: Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:package_info/package_info.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -74,13 +75,19 @@ class _SettingsState extends State<Settings> {
ListTile( ListTile(
leading: const Icon(Icons.info), leading: const Icon(Icons.info),
title: const Text("Informationen und Lizenzen"), title: const Text("Informationen und Lizenzen"),
onTap: () { onTap: () async {
final appInfo = await PackageInfo.fromPlatform();
if(!context.mounted) return;
showAboutDialog( showAboutDialog(
context: context, context: context,
applicationIcon: const Icon(Icons.send_time_extension_outlined), applicationIcon: const Icon(Icons.apps),
applicationName: "MarianumMobile", applicationName: "MarianumMobile",
applicationVersion: "Development Build", applicationVersion: "${appInfo.appName}\n\nPackage: ${appInfo.packageName}\n\nVersion: ${appInfo.version}\nBuild: ${appInfo.buildNumber}",
applicationLegalese: "Marianum Fulda 2023 Elias Müller", applicationLegalese: "Dies ist ein Inoffizieller Nextcloud & Webuntis Client und wird nicht vom Marianum selbst betrieben.\n"
"Keinerlei Gewähr für Vollständigkeit, Richtigkeit und Aktualität!\n\n"
"Development build\n"
"Marianum Fulda 2023 Elias Müller",
); );
}, },
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),

View File

@ -5,12 +5,14 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import package_info
import path_provider_foundation import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@ -68,6 +68,7 @@ dependencies:
file_picker: ^5.2.11 file_picker: ^5.2.11
loader_overlay: ^2.2.0 loader_overlay: ^2.2.0
crypto: ^3.0.3 crypto: ^3.0.3
package_info: ^2.0.2
dependency_overrides: dependency_overrides:
xml: ^6.2.2 xml: ^6.2.2
@ -106,6 +107,7 @@ flutter:
- assets/ca/ - assets/ca/
- assets/background/ - assets/background/
- assets/logo/ - assets/logo/
- assets/logo/icon
- assets/img/ - assets/img/
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see