setPushMetaData static method
void
setPushMetaData(})
Sets the push metadata for the client and saves it to the shared preferences
The isAnswer
flag is used to determine if the push notification indicates that we should answer the pending invite
The isDecline
flag is used to determine if the push notification indicates that we should decline the pending invite
Implementation
static void setPushMetaData(
Map<String, dynamic> pushMetaData, {
bool isAnswer = false,
bool isDecline = false,
}) {
final Map<String, dynamic> metaData = jsonDecode(pushMetaData['metadata']);
metaData['isAnswer'] = isAnswer;
metaData['isDecline'] = isDecline;
PreferencesStorage.saveMetadata(jsonEncode(metaData));
}