Issue I’m using flutter_downloader package and I have to get the data in listen method, but it doesn’t work. I don’t receive anything. I read that the issue could be because in send method I have to paste only primitive
Continue readingTag: dart-isolates
Can a closure be sent to a SendPort
Issue I’m working on implementation two-isolates app. In this scope I’m exploring a possibility to send a closure via SendPort. The documentation says that in case isolates share same code anything can be sent with some exceptions. But when I
Continue readingdart Isolate listen don't triggered (or work)
Issue My class: import ‘dart:isolate’; import ‘dart:ui’; import ‘package:flutter_downloader/flutter_downloader.dart’; class SettingsPage extends StatefulWidget with WidgetsBindingObserver { SettingsPage({Key? key}) : super(key: key); @override State<SettingsPage> createState() => _SettingsPageState(); } class _SettingsPageState extends State<SettingsPage> { final ReceivePort _port = ReceivePort(); int uploadProgress =
Continue readingHow do I fix this Sentry Zone mismatch error?
Issue 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; WidgetsFlutterBinding.ensureInitialized(); EasyLocalization.ensureInitialized() .then((value) => Fimber.plantTree(DebugTree())) .then((value) => SentryFlutter.init( (options) { options.dsn = ‘***’; // Set tracesSampleRate
Continue readingUsing Isolate to call a function
Issue 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
Continue readingCorrectly killing newly spawned isolates
Issue I am aware of the fact that when both microtask and event queues of an isolate are empty, the isolate is killed. However, I’m not able to find a reference on the documentation of how a worker isolate can
Continue readingDart Error: Dart_LookupLibrary: library 'package:background_fetch/background_fetch.dart' not found
Issue 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/flutter (18287): [ERROR:flutter/runtime/dart_isolate.cc(668)] Could not resolve main entrypoint function. E/flutter (18287): [ERROR:flutter/runtime/dart_isolate.cc(168)] Could not run the run main Dart entrypoint. E/flutter (18287): [ERROR:flutter/runtime/runtime_controller.cc(389)]
Continue readingHow to spawn an async function in Flutter?
Issue How an I spawn an Isolate blocking on an async function in Flutter? I tried dart:cli‘s waitFor function, but it seems that dart:cli does not work together with Flutter. Solution There is no supported way to block on an
Continue readingSet a callback accessible from an isolate in flutter
Issue I’m trying to achieve the following: I’m using a top level background handler for firebase notifications. However I would like to add an optional callback to the main app isolate. The objective is to trigger some UI refresh depending
Continue readingHow to stop playing a sound initiated in AlarmManager in Flutter
Issue I’m currently writing an alarm clock app in Flutter and need to be able to start playing a custom sound at a specific time, even without the app currently running. I’ve already been able to achieve this with the
Continue reading