https://github.com/myconsciousness/improvement-rate
A most easily usable improvement rate calculator library in Dart. With ImprovementRate, you can easily calculate improvement rate on your application.
https://github.com/myconsciousness/improvement-rate
calculator dart flutter improvement kaizen library pubdev
Last synced: 8 months ago
JSON representation
A most easily usable improvement rate calculator library in Dart. With ImprovementRate, you can easily calculate improvement rate on your application.
- Host: GitHub
- URL: https://github.com/myconsciousness/improvement-rate
- Owner: myConsciousness
- License: bsd-3-clause
- Created: 2021-12-27T09:18:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-27T15:32:53.000Z (almost 4 years ago)
- Last Synced: 2024-11-15T06:53:21.835Z (about 1 year ago)
- Topics: calculator, dart, flutter, improvement, kaizen, library, pubdev
- Language: Dart
- Homepage: https://pub.dev/packages/improvement_rate
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
**_A most easily usable improvement rate calculator library in Dart!_**
[](https://pub.dev/packages/improvement_rate)
[](https://codecov.io/gh/myConsciousness/improvement-rate)[](https://github.com/myConsciousness/improvement-rate/actions/workflows/analyzer.yml)[](https://github.com/myConsciousness/improvement-rate/actions/workflows/test.yml)
- [1. About](#1-about)
- [1.1. Introduction](#11-introduction)
- [1.1.1. Install Library](#111-install-library)
- [1.1.2. Import It](#112-import-it)
- [1.1.3. Use ImprovementRate](#113-use-improvementrate)
- [1.2. License](#12-license)
- [1.3. More Information](#13-more-information)
# 1. About
`ImprovementRate` is an open-sourced Dart library.
With `ImprovementRate`, you can easily calculate improvement rate on your application.
Maybe you have looked up a formula or implemented similar steps when comparing data and calculating improvement rates. With this library, such research and implementation is no longer necessary!
The following formula is used to calculate the improvement rate.
**_When after value should be increased:_**
```math
Rate = (after - before) / before × 100.0
```
**_When after value should be decreased:_**
```math
Rate = -((after - before) / before × 100.0)
```
## 1.1. Introduction
### 1.1.1. Install Library
**_With Dart:_**
```terminal
dart pub add improvement_rate
```
**_With Flutter:_**
```terminal
flutter pub add improvement_rate
```
### 1.1.2. Import It
```dart
import 'package:improvement_rate/improvement_rate.dart';
```
### 1.1.3. Use ImprovementRate
```dart
import 'package:improvement_rate/improvement_rate.dart';
void main() {
final calculator = Calculator.instance;
final resultShouldBeDecreased = calculator.evaluate(
before: 100,
after: 37,
);
final resultShouldBeIncreased = calculator.evaluate(
before: 100,
after: 37,
policy: ShouldBe.increased,
);
print(resultShouldBeDecreased);
print(resultShouldBeIncreased);
switch (resultShouldBeDecreased.trend) {
case Trend.better:
return;
case Trend.worse:
return;
}
}
```
## 1.2. License
```license
Copyright (c) 2021, Kato Shinya. All rights reserved.
Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
```
## 1.3. More Information
`ImprovementRate` was designed and implemented by **_Kato Shinya_**.
- [Creator Profile](https://github.com/myConsciousness)
- [License](https://github.com/myConsciousness/improvement-rate/blob/main/LICENSE)
- [API Document](https://pub.dev/documentation/improvement_rate/latest/improvement_rate/improvement_rate-library.html)
- [Release Note](https://github.com/myConsciousness/improvement-rate/releases)
- [Bug Report](https://github.com/myConsciousness/improvement-rate/issues)