worker_manager 2.6.2 copy "worker_manager: ^2.6.2" to clipboard
worker_manager: ^2.6.2 copied to clipboard

outdated

Executor allows you to create a queue of tasks for isolate pool

example/lib/main.dart

// Copyright Daniil Surnin. All rights reserved.
// Use of this source code is governed by a Apache license that can be
// found in the LICENSE file.

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:async/async.dart';
void main() async {
  runApp(MyApp());
  CancelableOperation;
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      showPerformanceOverlay: true,
      debugShowCheckedModeBanner: false,
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final results = [];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
                child: Text('fib(40) compute isolate'),
                onPressed: () {
                  final test = Test.kek;
                  print(test == Test.kek);
                }),
          ],
        ),
      ),
    );
  }
}

enum Test { kek, pek }
298
likes
0
pub points
94%
popularity

Publisher

verified publisherrenesanse.net

Executor allows you to create a queue of tasks for isolate pool

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

async

More

Packages that depend on worker_manager