subscribe method
Implementation
@override
Future subscribe(BuildContext context,
{bool configureBackground = false}) async {
_subs.add(FirebaseMessaging.onMessage.listen((event) {
final msg = extractMessage(event.data);
log.info("OnMessage received: ${event.data}");
newMessage(PushSource.foreground, msg);
}));
_subs.add(FirebaseMessaging.onMessageOpenedApp.listen((event) {
final msg = extractMessage(event.data);
log.info("OnLaunch received: ${event.data}");
newMessage(PushSource.resume, msg);
}));
}