skip to Main Content

I am sending notification with firebase, when click on notification I want to redirect to a page in webview, how can I do that?

FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessagemessage) {


   Navigator.push(
        context,
        MaterialPageRoute(
          builder: (context) => ,
       ));

 });

2

Answers


  1. You can check the answer here. The click_action payload should help your use case.

    Login or Signup to reply.
  2. FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
        webviewcontroller.loadUrl(message.[urllocation]); 
    });
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search