PlutoColumnType.currency constructor

PlutoColumnType.currency({
  1. dynamic defaultValue = 0,
  2. bool negative = true,
  3. String? format,
  4. bool applyFormatOnInit = true,
  5. bool allowFirstDot = false,
  6. String? locale,
  7. String? name,
  8. String? symbol,
  9. int? decimalDigits,
})

Set to currency column.

format '#,###' (Comma every three digits) '#,###.###' (Allow three decimal places)

negative Allow negative numbers

applyFormatOnInit When the editor loads, it resets the value to format.

allowFirstDot When accepting negative numbers, a dot is allowed at the beginning. This option is required on devices where the .- symbol works with one button.

locale Specifies the currency locale of the column. If not specified, the default locale is used.

Implementation

factory PlutoColumnType.currency({
  dynamic defaultValue = 0,
  bool negative = true,
  String? format,
  bool applyFormatOnInit = true,
  bool allowFirstDot = false,
  String? locale,
  String? name,
  String? symbol,
  int? decimalDigits,
}) {
  return PlutoColumnTypeCurrency(
    defaultValue: defaultValue,
    format: format,
    negative: negative,
    applyFormatOnInit: applyFormatOnInit,
    allowFirstDot: allowFirstDot,
    locale: locale,
    name: name,
    symbol: symbol,
    decimalDigits: decimalDigits,
  );
}