utils/formatters/formatters library
Functions
-
formatCurrency(
num number, {String locale = 'pt_BR'}) → String -
Formata o número com o seguinte pattern:
R$ 9.999,99 -
formatDate(
DateTime date, {String pattern = 'dd/MM/yyyy', String locale = 'pt_BR'}) → String - Formata uma data para o formato dd/mm/yyyy
-
formatDecimal(
num number, {String locale = 'pt_BR'}) → String -
Formata um número com o seguinte formato:
1.000.000,00 -
formatPercentage(
num value, {bool showPercentage = true}) → String -
Formata um número com o seguinte formato:
12% -
formatTelefone(
String telefone, [bool ddd = true]) → String - Formata a string no seguinte pattern: (xx) xxxxx-xxxx