'ABP signalR Notifications not received in Flutter
I'm trying to send notification from abp project using signalR and it works fine with angular but when I tried receive notification in flutter it does not work !! no notification received here is my flutter code
late HubConnection hubConnection ;
@override
void initState() {
connect();
super.initState();
}
void connect() async {
hubConnection= HubConnectionBuilder().withUrl(serverUrl, options: HttpConnectionOptions(
accessTokenFactory: ()=>Api.getAccessToken())).build();
hubConnection.start()?.then((value) => print('connected')); //prints connect successfully
hubConnection.on('ReceiveNotificationMessage', (arguments) {
print('notification');// doesn't print
print(arguments);// doesn't print
},);
}
Note: I am using signalr_netcore package I also tried signalr_client package
thanks in advance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
