-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpack.dart
39 lines (35 loc) · 867 Bytes
/
pack.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
class PackageInfoScreen extends StatefulWidget {
const PackageInfoScreen({super.key});
@override
State<PackageInfoScreen> createState() => _PackageInfoScreenState();
}
class _PackageInfoScreenState extends State<PackageInfoScreen> {
Map<String, dynamic> myPackageData = {};
@override
void initState() {
super.initState();
PackageInfo.fromPlatform().then((value) {
myPackageData = value.data;
setState(() {});
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Package Infos Details"),
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Text(
myPackageData.toString(),
style: const TextStyle(fontSize: 20),
),
),
),
);
}
}