smart_isolate_manager 0.0.2 copy "smart_isolate_manager: ^0.0.2" to clipboard
smart_isolate_manager: ^0.0.2 copied to clipboard

Smart and customizable isolate task manager for heavy Dart/Flutter tasks with full error handling.

example/main.dart

import 'package:flutter/material.dart';
import 'package:smart_isolate_manager/smart_isolate_manager.dart';

void main() async {
  final isolateManager = SmartIsolateManager();
  isolateManager.initialize(
    config: IsolateConfig(
      enableLogging: true,
      prettyLog: true,
      taskTimeout: Duration(seconds: 10),
    ),
  );

  final task = IsolateTask<int, int>(
    name: 'SquareTask',
    argument: 12,
    task: (number) async {
      await Future.delayed(Duration(seconds: 2));
      return number * number;
    },
  );

  try {
    final result = await isolateManager.runTask(task);
    debugPrint('✅ Result from isolate: $result');
  } catch (e) {
    debugPrint('❌ Error running task: $e');
  }
}
5
likes
160
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

Smart and customizable isolate task manager for heavy Dart/Flutter tasks with full error handling.

Repository (GitHub)
View/report issues

Topics

#isolate #concurrency #performance #flutter

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on smart_isolate_manager