tsac_dart 0.0.1

Flutter Android iOS web

Asynchronous task management tool for dart.

tsac_dart #

Asynchronous task management tool for dart.

Getting Started #

To use this plugin, add tsac_dart as a dependency in your pubspec.yaml file.

Example #

import 'package:tsac_dart/tsac_dart.dart';

main() {

  tsac.startTask(task1);

  tsac.startTask(task2);
}

final Task task1 = Task(token: "12345", jobs: [
      () async {
    print("task1.job1 started!");
    await Future.delayed(Duration(milliseconds: 700));
    print("task1.job1 done!");
  },
      () async {
    print("task1.job2 started!");
    await Future.delayed(Duration(milliseconds: 700));
    print("task1.job2 done!");
  },
],);

final Task task2 = Task(token: "123456", jobs: [
      () async {
    print("task2.job1 started!");
    tsac.cancelWithToken("12345");
    await Future.delayed(Duration(milliseconds: 700));
    print("task2.job1 done!");
  },
      () async {
    print("task2.job2 started!");
    await Future.delayed(Duration(milliseconds: 700));
    print("task2.job2 done!");
  },
],);

New Updates #

This project is under construction so if you find any issues, please add it on issue tracker here.

0
likes
90
pub points
0%
popularity

Asynchronous task management tool for dart.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

dev.piyushkumar@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on tsac_dart