resolveHeaderLevel method

double resolveHeaderLevel({
  1. List<double> headingSizes = Constant.default_heading_size,
})

Implementation

double resolveHeaderLevel({List<double> headingSizes = Constant.default_heading_size}) {
  return this == '#' || this == '1'
      ? headingSizes[0]
      : this == '##' || this == '2'
          ? headingSizes[1]
          : this == '###' || this == '3'
              ? headingSizes[2]
              : this == '####' || this == '4'
                  ? headingSizes[3]
                  : headingSizes[4];
}