clean up
This commit is contained in:
28
lib/data/services/messaging_imp.dart
Normal file
28
lib/data/services/messaging_imp.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:fcs/data/provider/messaging_fcm.dart';
|
||||
|
||||
import 'messaging_service.dart';
|
||||
|
||||
class MessagingServiceImp implements MessagingService {
|
||||
MessagingServiceImp();
|
||||
|
||||
static MessagingFCM messagingFCM;
|
||||
|
||||
@override
|
||||
void init(onMessage,
|
||||
{OnNotify onLaunch, OnNotify onResume, OnSetupComplete onSetupComplete}) {
|
||||
messagingFCM = MessagingFCM(onMessage,
|
||||
onLaunch: onLaunch,
|
||||
onResume: onResume,
|
||||
onSetupComplete: onSetupComplete);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> subscribe(String topic) {
|
||||
return messagingFCM.unsubscribeToTopic(topic);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> unsubscribe(String topic) {
|
||||
return messagingFCM.unsubscribeToTopic(topic);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user