FLUTTER ECOSYSTEM

i-aiymen/debt_simplification

グループ間の債務決済を簡素化するDart関数で、'Quick Split'アプリに似ています。債務リストを受け取り、簡略化されたリストを返します。

債務の簡素化 のプロジェクト画像
Stars
1
Forks
0
最終プッシュ(UTC)
2024/03/13
プロジェクト状態
公開中
Muhammed Ayimen Abdul Latheef  GitHub avatar
GITHUB User

Muhammed Ayimen Abdul Latheef ↗

Technical Product Lead

Tokyo, Japan
言語C++CMakeDartHTMLSwiftCKotlinObjective-C

技術トピック

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件
  • flutter{"sdk":"flutter"}
  • flutter_lints開発用^3.0.0
  • flutter_test開発用{"sdk":"flutter"}

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

debt_simplification

pub package style: lint

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.

Features Supported

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:

Platform Support

Android iOS macOS Web Linux Windows
✔ ✔ ✔ ✔ ✔ ✔

Usage

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);