简体   繁体   中英

How to exit from Flutter after calling flutter activity from android?

I am calling a flutter module/aar from my Android app. I used an intent which will be created after a button press which starts a flutter module/aar. Its working fine but I can't find any documentation guiding how to exit from flutter and start some other android intent or navigate back to previous android screen buy doing say a button press (without pressing back button).

You can use the SystemNavigator.pop() method:

Removes the topmost Flutter instance, presenting what was before it.

On Android, removes this activity from the stack and returns to the previous activity.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM