I am making a an app with 3 main screens: a reminders list, a homescreen, and a chatbot. The chatbot I will integrate in using Dialogflow, and i've co

One flutter screen should be working the entire time regardless of whether i am on that screen or another

submited by
Style Pass
2021-05-19 07:25:11

I am making a an app with 3 main screens: a reminders list, a homescreen, and a chatbot. The chatbot I will integrate in using Dialogflow, and i've completed the todo list. What the homescreen does is display pulse and temp taken from arduino through a bluetooth connection and if either exceeds or falls below a certain threshold then a call should be initiated. I currently did the call initiation and the pulse and temp values are hardcoded in for now. But if I go to another screen, the homescreen obviously doesn't do its job. What is the way I can make the homescreen kind of like the main thread . Basically even if i am on the chatbot screen, the homescreen should be checking if temp and pulse are abnormal and initiating calls if required. I am not sure what concept this falls under so any help is appreciated.

An isolate has its own memory and a single thread of execution that runs an event loop even in background until you kill Isolate.

Leave a Comment