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

Viewed 143

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.

1 Answers

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.

Related