Skip to content

Commit

Permalink
notif: Parse messages received, still just debug-printing
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice authored and chrisbobbe committed Oct 25, 2023
1 parent 30e77e0 commit 7a3f13d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/notifications.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/foundation.dart';

import 'api/notifications.dart';
import 'log.dart';
import 'model/binding.dart';

Expand Down Expand Up @@ -69,6 +70,10 @@ class NotificationService {

static void _onRemoteMessage(FirebaseRemoteMessage message) {
assert(debugLog("notif message: ${message.data}"));
// TODO(#122): parse data; show notification UI
final data = FcmMessage.fromJson(message.data);
if (data is MessageFcmMessage) {
assert(debugLog('notif message content: ${data.content}'));
// TODO(#122): show notification UI
}
}
}

0 comments on commit 7a3f13d

Please sign in to comment.