sendNotificationToTopic method
Send notification to FCM topic
Implementation
Future<bool> sendNotificationToTopic({
required String topic,
required String title,
required String body,
required Map<String, String> data,
}) async {
try {
// This would normally be done from backend
// For now, just log
if (kDebugMode) {
print('Would send notification to topic: $topic');
print('Title: $title, Body: $body');
print('Data: $data');
}
return true;
} catch (e) {
if (kDebugMode) {
print('Error sending notification: $e');
}
return false;
}
}