节省您在将货币从整数转换为字符串或字符串转换为整数的逻辑上的时间。
如果您有兴趣为我们的小型项目做出贡献,那将是惊人的!

功能

将货币格式从整数转换为字符串或字符串转换为整数

示例
从 650000 转换为 “Rp. 650,000,00”

当前支持的货币

  • 印尼盾(印度尼西亚)
  • 即将推出 *欢迎贡献?

入门

使用此软件包非常简单,只需将 github url 复制并粘贴到 pubspec.yaml
示例

dependencies:
  flutter:
    sdk: flutter

  strintcurrency:
    git:
      url: "https://github.com/FathanAkram-app/StrIntCurrencyLibrary.git"

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2

用法

整数转字符串

final strintcurrency = StrIntCurrency();
strintcurrency.intToStringID(2000); // it returns "Rp. 2,000,00"

整数转字符串(无符号)

final strintcurrency = StrIntCurrency();
strintcurrency.intToStringID(2000, symbol:false); // it returns "2,000,00"

字符串转整数

final strintcurrency = StrIntCurrency();
strintcurrency.intToStringID("Rp. 2,000,00"); // it returns 2000

附加信息

GitHub

查看 Github