MoneyFixer extension

Extension on Money to add improved serialization and formatting methods.

on
  • Money

Methods

formatImproved({String? pattern, bool invertSeparator = false}) String

Available on Money, provided by the MoneyFixer extension

Formats a Money value into a String according to the passed pattern.
toJsonImproved() Map<String, dynamic>

Available on Money, provided by the MoneyFixer extension

Serializes a Money value into a Map<String, dynamic>.

Static Methods

fromJsonImproved(Map<String, dynamic> json) → Money

Available on Money, provided by the MoneyFixer extension

Deserializes a Money value from a Map<String, dynamic>.
parseWithCurrencyImproved(String amount, Currency currency, {int? scale}) → Money

Available on Money, provided by the MoneyFixer extension

Creates a Money from a Fixed amount.