kinship_calculator 3.0.0 copy "kinship_calculator: ^3.0.0" to clipboard
kinship_calculator: ^3.0.0 copied to clipboard

A library for calculating Chinese relationships, ported from relationship.js

KinshipCalculator #

pub package GitHub license GitHub stars

Chinese kinship/relationship calculator.

中国亲戚关系计算器

Features #

  • 性别设置
  • 同种称呼的多种叫法
  • 通过关系链计算称谓
  • 通过称谓计算关系链
  • 逆向查找称呼

Getting started #

add kinship_calculator to your pubspec.yaml

将依赖添加到项目的 pubspec.yaml

dependencies:
  kinship_calculator: ^3.0.0

then run pub get or flutter pub get for flutter project

然后运行 pub get, flutter 项目运行 flutter pub get

Usage #

import 'package:kinship_calculator/kinship_calculator.dart';

void main() {
  final demo = KinshipCalculator.calculate(KinshipOption(
    text: '爸爸的弟弟',
  ));

  print('$demo');
}

For more example codes, please go to the example folder

更多的示例代码,请前往 example 文件夹

Thanks #

Ported from mumuy/relationship with some modifications.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

3
likes
160
points
28
downloads

Publisher

verified publisher0x0.ink

Weekly Downloads

A library for calculating Chinese relationships, ported from relationship.js

Homepage
Repository (GitHub)

Topics

#chinese #kinship #relationship #calculator

Documentation

API reference

License

MIT (license)

More

Packages that depend on kinship_calculator