async_tracker 0.1.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 55

async_tracker

Tracks async callbacks (e.g. microtask, Future, Stream, Timer) and indicates when any of these has completed their executions. It can be used to track and react on async event chains.

Clients of the AsyncTracker either listen on the stream or they can add or remove listeners that receive these events.

Usage

A simple usage example:

import 'package:async_tracker/async_tracker.dart';

main() {
  final tracker = new AsyncTracker();
  tracker.addListener(() {
    print('tracker has detected an execution');
  });

  tracker.run(() {
    // do any async stuff
  });
}

Changelog

0.1.1

  • Dart 2 support.

0.1.0

  • Initial version.

example/example.dart

import 'package:async_tracker/async_tracker.dart';

main() {
  final tracker = new AsyncTracker();
  tracker.addListener(() {
    print('tracker has detected an execution');
  });

  tracker.run(() {
    // do any async stuff
  });
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  async_tracker: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:async_tracker/async_tracker.dart';
  
Version Uploaded Documentation Archive
0.1.1 Sep 9, 2018 Go to the documentation of async_tracker 0.1.1 Download async_tracker 0.1.1 archive
0.1.0 Feb 10, 2018 Go to the documentation of async_tracker 0.1.0 Download async_tracker 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
13
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
55
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:async_tracker/async_tracker.dart.

Maintenance suggestions

The description is too long. (-10 points)

Search engines will display only the first part of the description. Try to keep it under 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0