PlutoColumnType.number constructor

PlutoColumnType.number({
  1. dynamic defaultValue = 0,
  2. bool negative = true,
  3. String format = '#,###',
  4. bool applyFormatOnInit = true,
  5. bool allowFirstDot = false,
  6. String? locale,
})

Set to numeric 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 numeric locale of the column. If not specified, the default locale is used.

Implementation

factory PlutoColumnType.number({
  dynamic defaultValue = 0,
  bool negative = true,
  String format = '#,###',
  bool applyFormatOnInit = true,
  bool allowFirstDot = false,
  String? locale,
}) {
  return PlutoColumnTypeNumber(
    defaultValue: defaultValue,
    format: format,
    negative: negative,
    applyFormatOnInit: applyFormatOnInit,
    allowFirstDot: allowFirstDot,
    locale: locale,
  );
}