MoneyFormatterAccessibility extension

on

Methods

accessibilityText(Decimal? amount, {dynamic negative = true, dynamic prefix = true}) String
Returns the textual string used for voiceover of an amount. e.g. '-$523.84 NZD' is returned as 'new zealand negative five hundred and twenty three dollars and eighty four cents'. Zero whole and fractional amounts return optimized text as follows: 0.00 is returned as 'zero dollars' instead of 'zero dollars and zero cents'. 1.00 is returned as 'one dollar' instead of 'one dollar and zero cents'. 0.15 is returned as 'fifteen cents' instead of 'zero dollars and fifteen cents'. negative specify true to prepend a 'negative' text if the amount is negative. prefix specify true to append the currencies accessibility suffix if the currency is not the defaultAccessibilityCurrency. Specify false to never include the prefix. Returns '' if there was an error formatting the string, or if an unavailable amount.