easy_isolate_mixin 1.0.1 copy "easy_isolate_mixin: ^1.0.1" to clipboard
easy_isolate_mixin: ^1.0.1 copied to clipboard

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

example/easy_isolate_mixin_example.dart

import 'package:easy_isolate_mixin/easy_isolate_mixin.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;
}
33
likes
140
points
409
downloads

Publisher

unverified uploader

Weekly Downloads

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_mixin