Hive, requestlog, etc

This commit is contained in:
2024-05-25 18:09:39 +02:00
parent 227d7871c2
commit 7e347a70c2
23 changed files with 1149 additions and 355 deletions

View File

@@ -0,0 +1,31 @@
import 'dart:io';
import 'package:package_info_plus/package_info_plus.dart';
class Globals {
static final Globals _singleton = Globals._internal();
factory Globals() {
return _singleton;
}
Globals._internal();
String appName = '';
String packageName = '';
String version = '';
String buildNumber = '';
String platform = '';
String hostname = '';
init() async {
PackageInfo packageInfo = await PackageInfo.fromPlatform();
this.appName = packageInfo.appName;
this.packageName = packageInfo.packageName;
this.version = packageInfo.version;
this.buildNumber = packageInfo.buildNumber;
this.platform = Platform.operatingSystem;
this.hostname = Platform.localHostname;
}
}