defaultNumberPointWidthBuilder static method

double defaultNumberPointWidthBuilder(
  1. double fontSize,
  2. int count
)

Get the width for the number point leading using the default implementation provided by Flutter Quill

Implementation

static double defaultNumberPointWidthBuilder(double fontSize, int count) {
  final length = '$count'.length;
  switch (length) {
    case 1:
    case 2:
      return fontSize * 2;
    default:
      // 3 -> 2.5
      // 4 -> 3
      // 5 -> 3.5
      return fontSize * (length - (length - 2) / 2);
  }
}