easy_isolate_helper 1.0.0 copy "easy_isolate_helper: ^1.0.0" to clipboard
easy_isolate_helper: ^1.0.0 copied to clipboard

A simplified mixin for launching Dart isolates in Flutter, seamlessly working with Flutter plugins

example/easy_isolate_helper_example.dart

import 'package:easy_isolate_helper/easy_isolate_helper.dart';

class Service with IsolateHelperMixin {
  Future<List<int>> performExpensiveWork() =>
      loadWithIsolate(() => _expensiveWork());
}

void main() {
  final service = Service();
  service.performExpensiveWork();
}

Future<List<int>> _expensiveWork() async {
  List<int> result = [];
  for (int i = 0; i < 1000000; i++) {
    result.add(i);
  }
  return result;
}
3
likes
130
pub points
16%
popularity

Publisher

unverified uploader

A simplified mixin for launching Dart isolates in Flutter, seamlessly working with Flutter plugins

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on easy_isolate_helper