skip to Main Content

Flutter – Using Isolate to call a function

I am running a test on using isolate to call function, below is my code import 'dart:isolate'; import 'package:flutter/material.dart'; void main() async { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp(…

VIEW QUESTION

Flutter Implementation of Isolates/compute inside stack of widgets – 'List<Future<Widget>>' can't be assigned to the parameter type 'List<Widget>'

The argument type 'List<Future>' can't be assigned to the parameter type 'List' return SizedBox( width: screenSize.width, height: screenSize.height, child: Stack( alignment: Alignment.topLeft, children: listOfWidgets) ); listOfWidgets for example 10 widgets, each widget having one isolate and one compute which are…

VIEW QUESTION

Flutter ReceiverPort don't listen

I'm using the flutter_downloader package to download files with my app. The progress notification is working nicely. but my ReceivePort is not listening to the progress. final ReceivePort port = ReceivePort(); @override void initState() { super.initState(); IsolateNameServer.registerPortWithName( port.sendPort, 'downloader_sendport'); port.listen((dynamic…

VIEW QUESTION
Back To Top
Search