dart-isolates Questions
4
I am currently using the following package where the readme illustrates the following
final bool loaded = await JsIsolatedWorker().importScripts(['test.js']);
I am using the isolate worker package...
Rosebud asked 3/6, 2022 at 22:27
3
Solved
I'm working on an app that receives notifications from firebase cloud messaging. I save the message in Hive upon receipt. I have a notification screen that displays the notification read from hive ...
Mafaldamafeking asked 16/1, 2022 at 13:45
4
Solved
Framework / SDK versions:
Flutter: 3.10.4
Dart: 3.0.3
Here goes my main() code:
Future<void> main() async {
//debugPaintSizeEnabled = true;
//BindingBase.debugZoneErrorsAreFatal = true;
W...
Hypsography asked 14/6, 2023 at 10:16
2
I'm currently implementing a simulation for some mathematical problems. Since Flutter has such an easy way to create user interfaces and has web-support, I decided to use Flutter for this project. ...
Strychnic asked 23/3, 2021 at 9:56
4
Solved
Can anyone tell me whats wrong in this code?
void onPressed() async {
//Navigator.pushNamed(context, "/screen2", arguments: []);
var receivePort = ReceivePort();
await Isolate.spawn(go...
Romy asked 9/3, 2022 at 8:11
1
I'm attempting to run location updates on a Flutter isolate thread, the error is only present when running an isolate. Location requests works without issues on the main thread. The goal here is to...
Bodine asked 8/2, 2020 at 18:37
5
Solved
I might have the wrong idea of Isolate and Future. Please help me to clear it up. Here is my understanding of both subjects.
Isolate: Isolates run code in its own event loop, and each event may ru...
Jonahjonas asked 25/9, 2018 at 12:57
1
Solved
How can I solve this problem:
E/flutter (18287): [ERROR:flutter/shell/common/shell.cc(89)] Dart Error: Dart_LookupLibrary: library 'package:background_fetch/background_fetch.dart' not found.
E/flut...
Misha asked 8/10, 2022 at 10:44
2
Solved
In this article, they spawned an isolate like this:
import 'dart:isolate';
void main() async {
final receivePort = ReceivePort();
final isolate = await Isolate.spawn(
downloadAndCompressTheInte...
Item asked 2/9, 2020 at 14:1
1
I am trying to call an async function from the Isolate function.
class IsolateExample {
final ReceivePort port = new ReceivePort();
IsolateExample(){
Isolate.spawn(isolateFunction, port.sendP...
Insole asked 14/5, 2018 at 16:19
2
Solved
How isolates are distributed across CPU cores
In Dart, you can run multiple isolates at the same time, and I haven't been able to find a guideline or best practice for using isolates.
My question i...
Aleciaaleck asked 5/4, 2022 at 4:4
1
I am currently trying to run a A* seek computation on flutter web
class AStarSeeker extends Seeker {
@override
Future<Path> Function() seek(SeekComputationInput input) {
return () => co...
Toast asked 27/1, 2022 at 14:41
1
Solved
I am not sure if I am doing anything wrong in this code but I am clearly passing a SendPort when spawning a new isolate, however when I call:
Infrastructure.instance.initialize(); I get following e...
Shirleneshirley asked 19/1, 2022 at 2:1
0
In my Flutter project for Windows, I use the compute function to run some code in an Isolate, in order to avoid freezing the user interface.
But I'm facing a problem: the code I run in the Isolate ...
Hip asked 27/9, 2021 at 10:1
3
Solved
I am new in flutter. I need to call 5 API network calls in a single screen. It is taking very long time while i am using Async/await. How can we execute it on separate threads parallelly using isol...
Quinonoid asked 3/7, 2021 at 12:21
1
Solved
When doing expensive computations in Dart it is highly recommended to start up additional isolates. I know that, since isolates don't share any state, if you want to create communication between th...
Zest asked 20/4, 2021 at 15:23
2
I am working on exposing an audio library (C library) for Dart. To trigger the audio engine, it requires a few initializations steps (non blocking for UI), then audio processing is triggered with a...
Purusha asked 19/4, 2020 at 18:24
3
Solved
UPDATE (15 july 2020)
mFeinstein's response, for now, is the only answer which gives me the first acceptable solution.
QUESTION
I have to ask you what is the best approach for doing what i'm try...
Samy asked 29/5, 2020 at 13:37
1
Solved
I'm new to flutter and I just learned how to use isolates in Dart. When I try to access shared preference via an isolate it throws the given below error. This error also appears when I try to acces...
Harms asked 17/2, 2021 at 5:41
1
I'm developping an app using Flutter. And I want to execute some Firebase queries using Isolate.
But each time I run the app I get this error and nothing is displayed.
Here my code
class HomePage...
Ignorant asked 30/11, 2019 at 21:16
0
I'm trying to upload a video on my AWS S3 server using dio package.
What is happening:
video's are uploading successfully but the api call blocks the UI thread and it will really slow down the app ...
Unruh asked 22/10, 2020 at 12:6
1
Solved
I wished to create an Isolate in Dart that I could pause and resume programmatically. This is the code that I used.
import 'dart:io';
import 'dart:isolate';
void main() async {
print("Starting i...
Grout asked 31/5, 2020 at 21:12
3
Solved
I made a function to post notification to a topic. It works great in normally, then I put it in compute function and hope it can posts notification in the background. But it not works.
Here is my c...
Seiter asked 16/11, 2018 at 7:41
1
Solved
In flutter when using the http package or doing general IO operations for example
import 'package:http/http.dart' as http;
http.Response response = await http.get(url);
if (response.statusCode =...
Arrange asked 5/7, 2019 at 16:47
3
Solved
I am trying to write an HTTP server in Dart that can handle multiple requests in parallel. I have been unsuccessful at achieving the "parallel" part thus far.
Here is what I tried at first:
imp...
Imco asked 23/5, 2013 at 0:13
1 Next >
© 2022 - 2024 — McMap. All rights reserved.