FLUTTER ECOSYSTEM

i-aiymen/debt_simplification

一个 Dart 函数,可简化群体之间的债务结算,类似于 'Quick Split' 应用。接收一个债务列表并返回一个简化的列表。

债务简化 项目封面
Stars
1
Forks
0
最近推送(UTC)
2024年3月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);