FLUTTER ECOSYSTEM

i-aiymen/debt_simplification

Uma função Dart que simplifica o pagamento de dívidas entre um grupo, semelhante ao aplicativo 'Quick Split'. Recebe uma lista de dívidas e retorna uma lista simplificada.

Capa do projeto simplificação de dívidas
Stars
1
Forks
0
Último push (UTC)
13 de mar. de 2024
Status do projeto
Ativo
Muhammed Ayimen Abdul Latheef  GitHub avatar
GITHUB User

Muhammed Ayimen Abdul Latheef ↗

Technical Product Lead

Tokyo, Japan
LinguagensC++CMakeDartHTMLSwiftCKotlinObjective-C

Tópicos técnicos

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens
  • flutter{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^3.0.0
  • flutter_testDesenvolvimento{"sdk":"flutter"}

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher 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);