Skip to content
Snippets Groups Projects
Commit 25e9d4d4 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Display app version in about page

parent 166fe523
No related branches found
No related tags found
1 merge request!37Resolve "Display app version in about page"
Pipeline #4553 passed
......@@ -44,7 +44,7 @@ android {
defaultConfig {
applicationId "org.benoitharrault.random"
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 30
versionCode appVersionCode.toInteger()
versionName appVersionName
......
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
......@@ -13,6 +13,7 @@
"about_title": "About",
"about_content": "A random application, for testing purpose only.",
"about_version": "Version: {version}",
"TOP": "TOP",
"BOTTOM": "BOTTOM"
......
......@@ -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"
......
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();
}
},
),
],
);
}
......
......@@ -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:
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment