Open SamarpanCoder2002 opened 2 years ago
static Key _key = Key.fromBase64(DataManagement.getEnvData(EnvFileKey.encryptKey) ?? '');
That's how I am importing env file data(encryptKey in this case). It works fine normally but does not import data while the app is in the background.
If possible, please fix this.
because background service is creating separate isolate from flutter app, you need to initialize first on your background service function, example: await dotenv.load(fileName: ".env");
await dotenv.load(fileName: ".env");
That's how I am importing env file data(encryptKey in this case). It works fine normally but does not import data while the app is in the background.
If possible, please fix this.