decimalPlaces property

int? decimalPlaces
final

The number of decimal places to format floating-point numbers found in text.

Configurable behaviors:

  • 2 (Default): Standard currency/price rounding (e.g., 12.345 -> 12.35).
  • 1: Precision metrics or ratings (e.g., 4.89 -> 4.9).
  • 0: Rounds to the nearest integer (e.g., 12.345 -> 12).
  • null: Completely disables automatic number formatting (useful for versions like v1.0.4, GPS coordinates, or codes).

Implementation

final int? decimalPlaces;