mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Add "About" dialog
This commit is contained in:
parent
d57e2033dc
commit
aa865eea1b
@ -1 +1 @@
|
||||
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"qr_utils","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]}]}
|
||||
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"package_info","dependencies":[]},{"name":"qr_utils","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]}]}
|
@ -8,7 +8,7 @@
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:label="inventree_app"
|
||||
android:label="InvenTree"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'login_settings.dart';
|
||||
|
||||
import 'package:package_info/package_info.dart';
|
||||
|
||||
class InvenTreeSettingsWidget extends StatefulWidget {
|
||||
// InvenTree settings view
|
||||
|
||||
@ -26,6 +28,12 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
subtitle: Text("Configure server and login settings"),
|
||||
onTap: _editServerSettings,
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text("About"),
|
||||
subtitle: Text("App details"),
|
||||
onTap: _about,
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
@ -35,4 +43,34 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
void _editServerSettings() {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeLoginSettingsWidget()));
|
||||
}
|
||||
|
||||
void _about() async {
|
||||
|
||||
PackageInfo.fromPlatform().then((PackageInfo info) {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: new SimpleDialog(
|
||||
title: new Text("About InvenTree"),
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text("App Name"),
|
||||
subtitle: Text("${info.appName}"),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("App Version"),
|
||||
subtitle: Text("${info.version}"),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Package Name"),
|
||||
subtitle: Text("${info.packageName}"),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Build Number"),
|
||||
subtitle: Text("${info.buildNumber}")
|
||||
),
|
||||
]
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
@ -121,6 +121,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.8"
|
||||
package_info:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0+16"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -30,6 +30,8 @@ dependencies:
|
||||
|
||||
qr_utils: ^0.1.4
|
||||
|
||||
package_info: ^0.4.0+16
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
Loading…
x
Reference in New Issue
Block a user