| @@ -9,6 +9,8 @@ PODS: | |||
| - image_picker (0.0.1): | |||
| - Flutter | |||
| - MTBBarcodeScanner (5.0.11) | |||
| - package_info (0.0.1): | |||
| - Flutter | |||
| - path_provider_linux (0.0.1): | |||
| - Flutter | |||
| - shared_preferences (0.0.1): | |||
| @@ -30,6 +32,7 @@ DEPENDENCIES: | |||
| - Flutter (from `Flutter`) | |||
| - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) | |||
| - image_picker (from `.symlinks/plugins/image_picker/ios`) | |||
| - package_info (from `.symlinks/plugins/package_info/ios`) | |||
| - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) | |||
| - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) | |||
| - shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`) | |||
| @@ -52,6 +55,8 @@ EXTERNAL SOURCES: | |||
| :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" | |||
| image_picker: | |||
| :path: ".symlinks/plugins/image_picker/ios" | |||
| package_info: | |||
| :path: ".symlinks/plugins/package_info/ios" | |||
| path_provider_linux: | |||
| :path: ".symlinks/plugins/path_provider_linux/ios" | |||
| shared_preferences: | |||
| @@ -73,6 +78,7 @@ SPEC CHECKSUMS: | |||
| flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 | |||
| image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 | |||
| MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb | |||
| package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 | |||
| path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 | |||
| shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d | |||
| shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78 | |||
| @@ -3,10 +3,12 @@ import 'package:farm_tpf/models/account.dart'; | |||
| import 'package:farm_tpf/presentation/custom_widgets/widget_loading.dart'; | |||
| import 'package:farm_tpf/presentation/custom_widgets/widget_toast.dart'; | |||
| import 'package:farm_tpf/presentation/screens/profile/sc_change_password.dart'; | |||
| import 'package:farm_tpf/utils/const_color.dart'; | |||
| import 'package:farm_tpf/utils/validators.dart'; | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:fluttertoast/fluttertoast.dart'; | |||
| import 'package:keyboard_dismisser/keyboard_dismisser.dart'; | |||
| import 'package:package_info/package_info.dart'; | |||
| import 'bloc_get_account.dart'; | |||
| @@ -32,9 +34,22 @@ class _UpdateProfileScreenState extends State<UpdateProfileScreen> { | |||
| TextEditingController _emailController = TextEditingController(); | |||
| TextEditingController _addressController = TextEditingController(); | |||
| PackageInfo _packageInfo = PackageInfo( | |||
| version: '1.0.0', | |||
| buildNumber: '1.', | |||
| ); | |||
| Future<void> _initPackageInfo() async { | |||
| final PackageInfo info = await PackageInfo.fromPlatform(); | |||
| setState(() { | |||
| _packageInfo = info; | |||
| }); | |||
| } | |||
| @override | |||
| void initState() { | |||
| super.initState(); | |||
| _initPackageInfo(); | |||
| flutterToast = FlutterToast(context); | |||
| getAccountBloc.getAccount((data) { | |||
| _account = data; | |||
| @@ -167,6 +182,15 @@ class _UpdateProfileScreenState extends State<UpdateProfileScreen> { | |||
| ))); | |||
| } | |||
| Widget _textPackageInfo() { | |||
| return Container( | |||
| width: double.infinity, | |||
| alignment: Alignment.centerRight, | |||
| child: Text( | |||
| "version:${_packageInfo.version}.${_packageInfo.buildNumber}", | |||
| style: TextStyle(color: COLOR_CONST.GRAY1_70))); | |||
| } | |||
| @override | |||
| Widget build(BuildContext context) => KeyboardDismisser( | |||
| child: Scaffold( | |||
| @@ -215,7 +239,11 @@ class _UpdateProfileScreenState extends State<UpdateProfileScreen> { | |||
| SizedBox( | |||
| height: 16.0, | |||
| ), | |||
| _btnChangePassword() | |||
| _btnChangePassword(), | |||
| SizedBox( | |||
| height: 8, | |||
| ), | |||
| _textPackageInfo() | |||
| ], | |||
| ), | |||
| )); | |||
| @@ -422,6 +422,13 @@ packages: | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "1.9.3" | |||
| package_info: | |||
| dependency: "direct main" | |||
| description: | |||
| name: package_info | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "0.4.3" | |||
| path: | |||
| dependency: transitive | |||
| description: | |||
| @@ -31,6 +31,7 @@ dependencies: | |||
| flutter_plugin_android_lifecycle: ^1.0.4 | |||
| shimmer: ^1.1.1 | |||
| font_awesome_flutter: ^8.8.1 | |||
| package_info: ^0.4.3 | |||
| dev_dependencies: | |||
| flutter_test: | |||