defaultFor static method

NumFormat defaultFor(
  1. CellValue? value
)

Returns the default format appropriate for value's runtime type.

Implementation

static NumFormat defaultFor(CellValue? value) => switch (value) {
  null ||
  FormulaCellValue() ||
  TextCellValue() ||
  CellErrorValue() => NumFormat.standard_0,
  IntCellValue() => NumFormat.defaultNumeric,
  DoubleCellValue() => NumFormat.defaultFloat,
  DateCellValue() => NumFormat.defaultDate,
  BoolCellValue() => NumFormat.defaultBool,
  TimeCellValue() => NumFormat.defaultTime,
  DateTimeCellValue() => NumFormat.defaultDateTime,
};