adaptify 1.0.0

  • Installing
  • Versions
  • 31


A library for adaptive decision-making with Dart. It supports the Dart VM and the browser with dart2js. This library was initially created for my master's thesis. Also, a second library for code distribution, called Code Mobility, was developed. For more information on this topic see the blog post on the blog of my employer inovex GmbH.


The Adaptify library is responsible for the decision-making. It utilizes the three basic resources CPU, memory and bandwidth. For every task used with Adaptify metadata with consumption information for the three resources must be defined. In the metadata the resource requirement is graded into low, medium or high consumption. Additionally, there is a fourth metadata which defines whether a task is time-critical.

Several components of the library interact with each other for the decision-making. At first the resource requirements of a task, as defined before, are determined. In addition, the monitor component provides information about the current capacity of the device. Both information sources are evaluated by an adaptation strategy and a decision is made. Adaptify is able to make a decision based on the resource requirements alone, if no monitor information has been collected or the adaptation strategy doesn't intend the use of a monitor. The decision is then forwarded to the decision unit which determines a final result and returns it to the application. The decision unit may further process the decision of an adaptation strategy. For example, several adaptation strategies can be evaluated within a decision unit. Subsequently, the decisions are collected and the result is determined by a majority decision.

The implementation with Dart provides several challenges. At first the two very different runtime environments (Dart VM and browser) offer different and very limited options to acquire the capacity information of a system. Furthermore, the comparability of measurements on different devices is a problem that makes it hard to use the results in an adaptation strategy. The implementation and conducted tests revealed that it's difficult to capture meaningful results for the three resources in both runtimes. Especially the browser complicates the data collection and only limited information are available. Therefore, the manual user input of the performance values is a good strategy to collect information for the monitor. In addition to the collection of information a good adaptation strategy is important. Adaptify currently provides two strategies based on conditional expressions and fuzzy logic. They are tested with user provided values and have proven their suitable for the decision-making in tests.


For feedback and bug reports just open an issue. Feel free to fork this project, create pull request and contact me for any questions.


The features are explained in the dartdoc documentation and the example implementations.


Adaptify is licensed under the BSD License.



  • First public release version with basic features


  • Initial version

1. Depend on it

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

  adaptify: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:adaptify/adaptify.dart';
Version Uploaded Documentation Archive
1.0.0 Feb 29, 2016 Go to the documentation of adaptify 1.0.0 Download adaptify 1.0.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
7 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: web, other

Primary library: package:adaptify/adaptify.dart with components: mirrors.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use adaptify.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.0 <2.0.0
fuzzylogic ^0.1.4 0.1.4 0.2.0
Dev dependencies
test >=0.12.0 <0.13.0