Notifications (android via local) work
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user