简体   繁体   中英

Can I run my flutter code without any UI.. like an api call

I have notification which has buttons. On a button click I want to call an API and just patch its value.

Its something like Whatsapp reply where we don't want the app to launch.

I know we can write native code for android and ios seperately. But it would be really great if i could run a snippet of dart code.

Since you have only asked if you can, yes you can. We did it in our android app a while back. The whole point of flutter engine is not only to render UIs but also to run code inside it without any UIs as well. Use platform channels for communication.

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