Skip to content

Commit

Permalink
Add app version to profile page (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
MDikkii authored Dec 26, 2023
1 parent 31e020c commit 56d1bb1
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 14 deletions.
34 changes: 20 additions & 14 deletions recipients_app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- AppCheckCore (10.18.0):
- GoogleUtilities/Environment (~> 7.11)
- PromisesObjC (~> 2.3)
- cloud_firestore (4.13.3):
- cloud_firestore (4.13.6):
- Firebase/Firestore (= 10.18.0)
- firebase_core
- Flutter
Expand All @@ -21,23 +21,23 @@ PODS:
- Firebase/Messaging (10.18.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 10.18.0)
- firebase_app_check (0.2.1-6):
- firebase_app_check (0.2.1-8):
- Firebase/CoreOnly (~> 10.18.0)
- firebase_core
- FirebaseAppCheck (~> 10.18.0-beta)
- Flutter
- firebase_auth (4.15.0):
- firebase_auth (4.15.3):
- Firebase/Auth (= 10.18.0)
- firebase_core
- Flutter
- firebase_core (2.24.0):
- firebase_core (2.24.2):
- Firebase/CoreOnly (= 10.18.0)
- Flutter
- firebase_crashlytics (3.4.6):
- firebase_crashlytics (3.4.8):
- Firebase/Crashlytics (= 10.18.0)
- firebase_core
- Flutter
- firebase_messaging (14.7.6):
- firebase_messaging (14.7.9):
- Firebase/Messaging (= 10.18.0)
- firebase_core
- Flutter
Expand Down Expand Up @@ -134,6 +134,8 @@ PODS:
- nanopb/encode (= 2.30909.1)
- nanopb/decode (2.30909.1)
- nanopb/encode (2.30909.1)
- package_info_plus (0.4.5):
- Flutter
- PhoneNumberKit (3.7.5):
- PhoneNumberKit/PhoneNumberKitCore (= 3.7.5)
- PhoneNumberKit/UIKit (= 3.7.5)
Expand All @@ -160,6 +162,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- libphonenumber_plugin (from `.symlinks/plugins/libphonenumber_plugin/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

Expand Down Expand Up @@ -208,6 +211,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios"
libphonenumber_plugin:
:path: ".symlinks/plugins/libphonenumber_plugin/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
Expand All @@ -220,21 +225,21 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
AppCheckCore: 4687c03428947d5b26a6bf9bb5566b39f5473bf1
cloud_firestore: 9b25b77371a845d07a48e5146799f6d4552f5940
cloud_firestore: c29d4c2e96fe31374d9dab458a99d7a488d3a735
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
firebase_app_check: 1b1986f696705c793cb6bac2f429f2cbe65f0fbc
firebase_auth: 02d1a6340f81020cc302fb8fea8518908c546cec
firebase_core: f802c5c1f6caff9b8d38b591a36e7b25f8878936
firebase_crashlytics: 0db78a5b6badc630f21a833d0c9ab20ab5d81948
firebase_messaging: ca2fc59ddd52ef032d80f1a717d12eae8fa0e994
firebase_app_check: 375d2482bc2219ef06df67f2ad659c377b2c1075
firebase_auth: df44e14f8a93e8a9869d91695bd3f8e53d2c9f5a
firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5
firebase_crashlytics: 55714f63ae0973c54b3a721c451ae5f815086c1f
firebase_messaging: 875385354f623750aa03204a028d640108bc3412
FirebaseAppCheck: f34226df40cf6057dc54916ab5a5d461bb51ee68
FirebaseAppCheckInterop: 3cd914842ba46f4304050874cd284de82f154ffd
FirebaseAuth: 12314b438fa76048540c8fb86d6cfc9e08595176
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
FirebaseCoreExtension: 62b201498aa10535801cdf3448c7f4db5e24ed80
FirebaseCoreInternal: 8eb002e564b533bdcf1ba011f33f2b5c10e2ed4a
FirebaseCrashlytics: 86d5bce01f42fa1db265f87ff1d591f04db610ec
FirebaseFirestore: 3f48a8b2aca4c247d92b7e25bee69bbafed775c8
FirebaseFirestore: 584e3f563142f63d20e9ec9c505370d674d44eba
FirebaseInstallations: e842042ec6ac1fd2e37d7706363ebe7f662afea4
FirebaseMessaging: 9bc34a98d2e0237e1b121915120d4d48ddcf301e
FirebaseSessions: f90fe9212ee2818641eda051c0835c9c4e30d9ae
Expand All @@ -243,8 +248,9 @@ SPEC CHECKSUMS:
GoogleDataTransport: 57c22343ab29bc686febbf7cbb13bad167c2d8fe
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
GTMSessionFetcher: 41b9ef0b4c08a6db4b7eb51a21ae5183ec99a2c8
libphonenumber_plugin: e8a7d64a6624a7c25f2c4ab0b7ead2a8e341e35e
libphonenumber_plugin: 48bf4078546377eedaab4aa54978cd0f6fa23072
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
PhoneNumberKit: f3980e01b84615524dd496adee6a1b5ced87d3f4
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
Expand Down
1 change: 1 addition & 0 deletions recipients_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"yourMobilePhone": "Your mobile phone",
"continueText": "Continue",
"phoneNumber": "Phone number",
"appVersion": "App version:",

"invalidPhoneNumberError": "Invalid phone number. Please check your phone number and try again.",
"invalidVerificationCodeError": "Invalid verification code. Please check provided SMS code and try again.",
Expand Down
2 changes: 2 additions & 0 deletions recipients_app/lib/l10n/app_kri.arb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@
"yourMobilePhone": "Yu mobayl fon",
"continueText": "Kɔntinyu",
"phoneNumber": "Fon nɔmba",
"appVersion": "App version:",

"invalidPhoneNumberError": "Fon nɔmba nɔ kɔrɛkt. Chɛk yu fon nɔmba ɛn tray bak ya.",
"invalidVerificationCodeError": "Di spɛshal kod we wi sɛn yu nɔ kɔrɛkt. Duya chɛk di SMS kod ɛn tray bak.",
"userDisabledError": "Wi dɔn lɔk yu akawnt. Rich awt to wi if yu want fɔ no mɔ.",
Expand Down
25 changes: 25 additions & 0 deletions recipients_app/lib/view/pages/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "package:flutter/material.dart";
import "package:flutter_bloc/flutter_bloc.dart";
import "package:flutter_gen/gen_l10n/app_localizations.dart";
import "package:intl/intl.dart";
import "package:package_info_plus/package_info_plus.dart";

class AccountPage extends StatefulWidget {
final Recipient recipient;
Expand All @@ -39,6 +40,15 @@ class AccountPageState extends State<AccountPage> {
late final TextEditingController _contactNumberController;
late final TextEditingController _emailController;

PackageInfo _packageInfo = PackageInfo(
appName: "Unknown",
packageName: "Unknown",
version: "Unknown",
buildNumber: "Unknown",
buildSignature: "Unknown",
installerStore: "Unknown",
);

@override
void initState() {
super.initState();
Expand Down Expand Up @@ -66,6 +76,15 @@ class AccountPageState extends State<AccountPage> {
text: widget.recipient.communicationMobilePhone?.phoneNumber.toString() ??
"",
);

_initAppVersionInfo();
}

Future<void> _initAppVersionInfo() async {
final info = await PackageInfo.fromPlatform();
setState(() {
_packageInfo = info;
});
}

@override
Expand Down Expand Up @@ -405,6 +424,12 @@ class AccountPageState extends State<AccountPage> {
onPressed: () => context.read<AuthCubit>().logout(),
label: localizations.signOut,
),
const SizedBox(height: 16),
Text(
"${localizations.appVersion} ${_packageInfo.version} (${_packageInfo.buildNumber})",
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.labelSmall,
),
],
),
),
Expand Down
40 changes: 40 additions & 0 deletions recipients_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -493,6 +501,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.15.4"
http:
dependency: transitive
description:
name: http
sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
url: "https://pub.dev"
source: hosted
version: "1.1.2"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -669,6 +685,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
url: "https://pub.dev"
source: hosted
version: "5.0.1"
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:
Expand Down Expand Up @@ -1058,6 +1090,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.10.0"
win32:
dependency: transitive
description:
name: win32
sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574
url: "https://pub.dev"
source: hosted
version: "5.1.1"
xml:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions recipients_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies:
json_annotation: ^4.8.1
json_serializable: ^6.7.1
flutter_native_splash: ^2.3.6
package_info_plus: ^5.0.1
rounded_loading_button: ^2.1.0
url_launcher: ^6.2.1
webview_flutter: ^4.4.2
Expand Down

0 comments on commit 56d1bb1

Please sign in to comment.