25-1/28/1
This commit is contained in:
@@ -35,6 +35,17 @@ class AppInitializer {
|
||||
|
||||
Future<void> initializeApp() async {
|
||||
await getKey();
|
||||
await getAIKey('FCM_PRIVATE_KEY');
|
||||
}
|
||||
|
||||
getAIKey(String key) async {
|
||||
var res =
|
||||
await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key});
|
||||
if (res != 'failure') {
|
||||
var d = jsonDecode(res)['message'];
|
||||
storage.write(key: 'FCM_PRIVATE_KEY', value: d[key].toString());
|
||||
// return d[key].toString();
|
||||
} else {}
|
||||
}
|
||||
|
||||
Future<void> getKey() async {
|
||||
|
||||
Reference in New Issue
Block a user