Notifications (android via local) work

This commit is contained in:
2024-06-15 21:29:51 +02:00
parent e6fbf85e6e
commit e9ea573e33
39 changed files with 476 additions and 104 deletions

View File

@@ -1,3 +1,4 @@
import 'dart:ffi';
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
@@ -13,6 +14,8 @@ class Globals {
Globals._internal();
bool _initialized = false;
String appName = '';
String packageName = '';
String version = '';
@@ -24,7 +27,11 @@ class Globals {
late SharedPreferences sharedPrefs;
bool get isInitialized => _initialized;
Future<void> init() async {
if (_initialized) return;
PackageInfo packageInfo = await PackageInfo.fromPlatform();
this.appName = packageInfo.appName;
@@ -54,6 +61,8 @@ class Globals {
}
this.sharedPrefs = await SharedPreferences.getInstance();
this._initialized = true;
}
String? getPrefFCMToken() {