Questions tagged [dart-isolates]

In the Dart programming language, an Isolate is a single-threaded unit of concurrency.

In the Dart programming language, an Isolate is a single-threaded unit of concurrency. Communication with others Isolates is done via message passing.

Introduktion to Dart Isolate

dart:isolate library

296 questions
0
votes
1 answer

How to make "compute()" function insert data to sqlite while in isolated process?

I'm working on flutter app that uses php apis for server and sqlite for local data. The problem is with "compute()". Here is the explanation : I have three functions that receives data from api on the server, then add the data to my local database…
alnajm
  • 335
  • 1
  • 2
  • 14
0
votes
2 answers

MissingPluginException when using a plugins With Alarm Manager Call Back

I use android_alarm_manager_plus 2.0.2 plugin in my project and on Call back I use A Function And I Play a Sound With assets_audio_player_3.0.6. But I Faced with This Error MissingPluginException(No implementation found for method stop on channel…
Sajjad
  • 2,593
  • 16
  • 26
0
votes
1 answer

Trouble running Parse LiveQuery in isolate compute function

Simply moved my live query to an isolate and it no longer works. I want my isolate to wait for a live query object concurrent to a few other simple tasks. I'm getting a pretty vague error message in the debug console and I don't have much to go off…
RobbB
  • 1,214
  • 11
  • 39
0
votes
0 answers

For loops mysteriously not running while others are

I'm trying to run an isolate to run my offline hashing auth function. I'm condensing all the data into one list, then I'm assigning it in the function. For some strange reason the 2nd loop runs and the other 2 don't. The first two were created to…
RobbB
  • 1,214
  • 11
  • 39
0
votes
1 answer

Does compute support async request?

I have a list of String addresses like: List addressStrings = [....]; I am using the geocoding plugin to get the address data and marker for these address strings: //This is a class-level function Future>…
0
votes
1 answer

What is simplest way to prevent frame drop in flutter application on heavy task?

I've ran into problem getting UI lags when this line is running: var keys = crypt.generateKeys(); Here is the full function: void createKeys(_) async { SharedPreferences prefs = await SharedPreferences.getInstance(); var keys =…
dancheg
  • 549
  • 1
  • 4
  • 14
0
votes
1 answer

Flutter - Isolate : NoSuchMethodError: The method 'toRawHandle' was called on null

Goal I'm trying to perform real-time object detection with a Flutter app, using Tensorflow 2, with a SSD Mobilenet V2 model I managed to get this work, using this git repo However, I am encountering some latencies on the camera output display, so I…
Larvouu
  • 132
  • 12
0
votes
2 answers

Flutter: Print to console from Dart isolates?

Having trouble finding information about this online. I'm just trying to figure out if a particular function in a Dart isolate is actually being run. The only way I know how to do this is by using the print() function, but either my function isn't…
Teekin
  • 12,581
  • 15
  • 55
  • 67
0
votes
0 answers

How to execute some code just before app is swiped off from task list in flutter?

I want to execute some code(say calling a REST API) just before the App is swiped off the task list. So far I've tried used WidgetsBindingObserver to detect when the app reaches detached state. The connection is lost before reaching the detached…
0
votes
1 answer

How provide unique id for Flutter_Downloader?

How can unique ID be provided for each download when new download is added by the button? I'm using Flutter_Downloader api Since static method is used for communication of isolates, i have tried referencing is id to the class but to no avail. Help…
Mala
  • 89
  • 9
0
votes
1 answer

How to use flutter_blue in background isolate to scan & connect with BLE device

I would like to find and connect bluetooth devie on background isolate without any diplay. I develop app using flutter dart. I found a good example using flutter_blue 0.7.3 that starts with the following widget. How can I do this part in background,…
Kobi
  • 127
  • 1
  • 11
0
votes
0 answers

Am I using 'Isolate' and 'CachedNetworkImage' correctly?

To speed up the loading of profile images, I created an Isolate and cached it in it. Code to load profile image influencers.forEach( (influencer) { Isolate.spawn( FileDownloadController.imagePreload, …
0
votes
0 answers

How do I call a top level function from inside a widget in Flutter? Trying to do an isolate

I'm trying to run an isolated function in Flutter. Here is my code: This is the function I use to call the isolated function (runs inside the widget): void start() async { ReceivePort receivePort = ReceivePort(); //port for this main isolate…
Ahmed Wagdi
  • 3,913
  • 10
  • 50
  • 116
0
votes
1 answer

Why doesn't the isolate receive the stop message?

The UI shows two button: One button to start an isolate, and a second button to stop it at next occasion. The UI (widget) code looks like this: SendPort sendToIsolatePort; void _onStartIsolateButtonPushed() async { ReceivePort receivePort =…
SePröbläm
  • 5,142
  • 6
  • 31
  • 45
0
votes
1 answer

Flutter & Dart : What is an isolate in flutter?

As I study about flutter, I notices that there is a thing called isolate. What is it for? And how do we implement that? Can you give me a simple example? Thank you in advance.
Punreach Rany
  • 2,560
  • 7
  • 23
  • 56