How to navigate to a specific flutter route from an Android activity?

后端 未结 2 1319
离开以前
离开以前 2021-02-14 11:34

I have an existing android application and i have integrated flutter in my project i want to call a flutter specific route which i define in my main method like this

         


        
2条回答
  •  一向
    一向 (楼主)
    2021-02-14 12:21

    Just create a method channel and call a flutter function from Android. In that function navigate your app from flutter to where ever you want.

    for more info about how to use method channels to communicate between flutter and native code and vice versa. Please have a look

    https://flutter.dev/docs/development/platform-integration/platform-channels

提交回复
热议问题