diff --git a/android/app/build.gradle b/android/app/build.gradle index 633cf39d0f9a4ddc79b583d4c78ed7bdf5b62a83..c722841e51aa1f2271d161773cbaf991b5a80222 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -44,7 +44,7 @@ android { defaultConfig { applicationId "org.benoitharrault.random" - minSdkVersion 16 + minSdkVersion 19 targetSdkVersion 30 versionCode appVersionCode.toInteger() versionName appVersionName diff --git a/android/gradle.properties b/android/gradle.properties index 90f56e609e4f9b97af2e5aafc2a375cf2dbe1762..de0981053b30e22ab3dc41240f178d99b0347646 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=1.0.28 -app.versionCode=29 +app.versionName=1.0.29 +app.versionCode=30 diff --git a/assets/translations/en.json b/assets/translations/en.json index 75ccbde48e9c653bf70476448a8e38fdc027155d..2347221fb3e9e2ceb24bed2076e933740103fcba 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -13,6 +13,7 @@ "about_title": "About", "about_content": "A random application, for testing purpose only.", + "about_version": "Version: {version}", "TOP": "TOP", "BOTTOM": "BOTTOM" diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 0ede7bfefabb91d9293ff1930da4b9614442ae5f..332b150839dcc5b662baddceaba6e2203af94ae1 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -13,6 +13,7 @@ "about_title": "À propos", "about_content": "Application fourre-tout, à des fins de tests uniquement.", + "about_version": "Version : {version}", "TOP": "HAUT", "BOTTOM": "BAS" diff --git a/lib/ui/screens/about_page.dart b/lib/ui/screens/about_page.dart index 6c76ab1f6d4d24710844411aed3fc6f32985a9ae..5a66139f56d14bbc323db6b5c19f644641949593 100644 --- a/lib/ui/screens/about_page.dart +++ b/lib/ui/screens/about_page.dart @@ -1,5 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:package_info_plus/package_info_plus.dart'; import '../widgets/header.dart'; @@ -16,6 +17,21 @@ class AboutPage extends StatelessWidget { SizedBox(height: 8), Header(text: 'about_title'), Text('about_content').tr(), + FutureBuilder<PackageInfo>( + future: PackageInfo.fromPlatform(), + builder: (context, snapshot) { + switch (snapshot.connectionState) { + case ConnectionState.done: + return Text('about_version').tr( + namedArgs: { + 'version': snapshot.data!.version, + }, + ); + default: + return const SizedBox(); + } + }, + ), ], ); } diff --git a/pubspec.lock b/pubspec.lock index f09ef341ba589f2539fb9e183e59ffe49fff7809..d2e91843c0f909f99aa9ac293378cd8b3347a244 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -9,6 +9,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" bloc: dependency: transitive description: @@ -120,6 +128,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.3" + http: + dependency: transitive + description: + name: http + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" hydrated_bloc: dependency: "direct main" description: @@ -168,6 +192,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + package_info_plus: + dependency: "direct main" + description: + name: package_info_plus + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" path: dependency: transitive description: @@ -309,6 +349,22 @@ packages: description: flutter source: sdk version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" synchronized: dependency: transitive description: @@ -317,6 +373,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ab6acea7cc0bac20882b6333e10eb06250fe6d16..821762c25ad6f9697faa9f03eadcfe75397b3cd3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A random application, for testing purpose only. publish_to: 'none' -version: 1.0.28+29 +version: 1.0.29+30 environment: sdk: '^3.0.0' @@ -19,6 +19,7 @@ dependencies: hydrated_bloc: ^9.0.0 ionicons: ^0.2.2 unicons: ^2.1.1 + package_info_plus: ^4.2.0 flutter: uses-material-design: false