v1.0.2
debt_simplification
Eine Dart-Funktion zur Vereinfachung der Schuldabwicklung in Gruppen, ähnlich wie 'Quick Split'.
5Likes 3130-Tage-Downloads160Pub-Punkte
AndroidiOSWebmacOSWindowsLinux
Eine Dart-Funktion, die die Begleichung von Schulden innerhalb einer Gruppe vereinfacht, ähnlich der App 'Quick Split'. Nimmt eine Liste von Schulden entgegen und gibt eine vereinfachte Liste zurück.
{"sdk":"flutter"}^3.0.0{"sdk":"flutter"}Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
A Dart function that simplifies debt settlements among a group, similar to 'Quick Split' app. Takes a list of debts and returns a simplified list.
See the example app for detailed implementation information.
| Features | Android | iOS | macOS | Web | Windows |
|---|---|---|---|---|---|
| Show toast | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Android | iOS | macOS | Web | Linux | Windows |
|---|---|---|---|---|---|
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Import the package with:
import 'package:debt_simplification/debt_simplification.dart';
Then, use the following code to simplify the debts:
List<Map<String, Map<String, int>>> initialDebts = [
{
"Alice": {
"Bob": 10,
"Charlie": 5,
} // Bob owes Alice 10, Charlie owes Alice 5
},
{
"Bob": {
"Alice": 2,
"Charlie": 3,
} // Alice owes Bob 2, Charlie owes Bob 3
},
{
"Charlie": {
"Alice": 7,
} // Alice owes Charlie 7
}
];
List simplifiedDebts = DebtSimplification.simplify(initialDebts);