Skip to content

Commit

Permalink
update home.dart, pubspec.lock and pubspec.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquarius-blake committed Jun 5, 2023
1 parent 69c0d91 commit 99c4589
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
17 changes: 16 additions & 1 deletion lib/Screens/Home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import 'package:get/get.dart';
import 'package:get/get_core/get_core.dart';
import 'package:image_picker/image_picker.dart';
import 'package:line_icons/line_icons.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart';
import '../../Provider/user_provider.dart';
import '../../Services/auth.dart';
Expand Down Expand Up @@ -93,14 +94,28 @@ class _HomeState extends State<Home> {
int _page=0;
late PageController pageController;
String title="Home";
late String appName;
late String packageName;
late String version;
late String buildNumber;

void getappinfo()async{
PackageInfo packageInfo = await PackageInfo.fromPlatform();
setState(() {
appName = packageInfo.appName;
packageName = packageInfo.packageName;
version = packageInfo.version;
buildNumber = packageInfo.buildNumber;
});
}

@override
void initState() {
// initial();
pageController=PageController();
super.initState();
initiateDynamiclink();
getappinfo();
}
@override
void dispose() {
Expand Down Expand Up @@ -435,7 +450,7 @@ class _HomeState extends State<Home> {
),
Center(
child: Text(
"v1.0 BETA",
"v"+version+" BETA",
style: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.bold,
Expand Down
16 changes: 15 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.2"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
page_transition:
dependency: transitive
description:
Expand Down Expand Up @@ -702,4 +716,4 @@ packages:
version: "3.1.1"
sdks:
dart: ">=2.18.0 <3.0.0"
flutter: ">=3.0.0"
flutter: ">=3.3.0"
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ dependencies:
firebase_dynamic_links: ^2.0.6
encrypt: ^5.0.1
animated_splash_screen: ^1.3.0
package_info_plus: ^4.0.2


dev_dependencies:
Expand Down

0 comments on commit 99c4589

Please sign in to comment.