decimals property

int get decimals

Implementation

int get decimals {
  final parts = toString().split('.');

  return parts.length == 1 ? 0 : parts[1].length;
}