sendNotificationViaCloud static method
Calls secureOps Cloud Function to send a push notification server-side. Returns true if sent successfully, false otherwise.
Implementation
static Future<bool> sendNotificationViaCloud({
required String token,
required String title,
required String body,
Map<String, String>? data,
}) async {
try {
final result = await callSecureOps({
'action': 'sendNotification',
'token': token,
'title': title,
'body': body,
'data': data ?? {},
});
return result['success'] == true;
} catch (e, st) {
NeomErrorLogger.recordError(e, st, module: 'neom_core', operation: 'sendNotificationViaCloud');
return false;
}
}