toJson method

Map<String, dynamic> toJson()

Returns a JSON representation of this Money instance.

The JSON representation can be used to recreate this Money instance using the Money.fromJson factory.

Implementation

Map<String, dynamic> toJson() => {
      'minorUnits': amount.minorUnits.toString(),
      'decimals': amount.decimalDigits,
      'isoCode': currency.isoCode,
    };