commingle_money 4.0.3 copy "commingle_money: ^4.0.3" to clipboard
commingle_money: ^4.0.3 copied to clipboard

Open-source utilities from the Commingle app (https://commingle.app) for handling, formatting, and displaying monetary values in Flutter.

4.0.3 #

  • Currency: JOD precision is 3

4.0.2 #

  • MoneyEditingController.showKeyboard(): a more reliable way to show the keyboard than focusNode.requestFocus(), which does nothing when the field is already focused. CommingleMoneyField uses this on tap.

4.0.1 #

  • CommingleMoneyField: respect the system text scaler when measuring glyphs so amount width, height, and affix alignment stay correct at accessibility text sizes

4.0.0 #

  • Breaking: Requires Flutter 3.47+ and Dart 3.13+. Widgets now use package:material_ui and package:cupertino_ui.

3.1.0 #

  • Currency: added flagCode — ISO 3166-1 alpha-2 / organization codes compatible with the flag package (FlagsCode / Flag.fromString), e.g. "GB" for GBP, "EU" for EUR; null when no flag applies (e.g. Bitcoin)

3.0.0 #

  • Breaking: Replaced package:decimal with package:big_decimal throughout the library (models, controllers, widgets, and utilities).

This change was made after observing performance bottlenecks with package:decimal while processing large datasets in the Commingle app. In my benchmarks, some arithmetic operations, such as rounding, were measured to be up to 400× slower than their BigDecimal equivalents. For more details, see: https://github.com/a14n/dart-decimal/issues/122.

If your application still uses package:decimal, you can make the migration incrementally with the following conversion helpers:

import 'package:big_decimal/big_decimal.dart';
import 'package:decimal/decimal.dart';

BigDecimal decimalToBigDecimal(Decimal value) => BigDecimal.parse(value.toString());

Decimal bigDecimalToDecimal(BigDecimal value) {
  if (value is BigDecimalInfinity) {
    throw UnsupportedError('Cannot convert infinite BigDecimal to Decimal');
  }
  return Decimal.parse(value.toPlainString());
}

2.2.1 #

  • CommingleMoneyField: stopped and invisible cursor no longer triggers continuous rebuilds, improving performance when the field is not focused

2.2.0 #

  • CommingleMoneyField: add CommingleMoneyFieldLayout with compact and expanded trailing-suffix layouts
  • Example app: add controls for switching CommingleMoneyField layout and field builder decoration

2.1.2 #

  • CommingleMoneyField: allow arithmetic operators when the current value is zero while still ignoring operators for empty values

2.1.1 #

  • CommingleMoneyField: fix affix appearance so prefix/suffix content does not animate on initial render and only animates on later visibility changes

2.1.0 #

  • CommingleMoneyField: add fieldBuilder for wrapping the field content with custom widgets such as borders, containers, or decorators

2.0.5 #

  • README additions.

2.0.4 #

  • README additions.

2.0.3 #

  • Example app: use locale-based separator detection on web and keep LocalePlus on non-web platforms

2.0.2 #

  • Fix README rendering on pub.dev

2.0.1 #

  • Fix README rendering on pub.dev

2.0.0 #

  • New widget: CommingleMoneyField
  • Ability to perform truncated quotient on Money instances like money ~/ 10
  • Introduces Bitcoin currency
  • Completes the list of CurrencyCodes for all available currencies
  • Adds include filtering to Currency.list, making it possible to include or exclude currencies before sorting
  • Bug fix: Correctly updates precision of AmountEditingController if the currency is changed
  • Bug fix: Leading-decimal lazy input like .01 is now parsed correctly by amount and money editing controllers
  • Bug fix: Corrects currency precision for BND, CNY, IRR, MGA, MRU, SGD, and VES

1.1.0 #

  • Upgrade dependencies

1.0.0 #

  • Initial version
15
likes
150
points
709
downloads

Documentation

API reference

Publisher

verified publishercommingle.app

Weekly Downloads

Open-source utilities from the Commingle app (https://commingle.app) for handling, formatting, and displaying monetary values in Flutter.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

animated_flip_counter, big_decimal, collection, cupertino_ui, equatable, expressions, flutter, material_ui

More

Packages that depend on commingle_money