max method

IntType max(
  1. int value
)

allow only values <= value value the maximum value

Implementation

IntType max(int value) {
  test<int>(
    type: int,
    name: "max",
    params: {
      "max": value
    },
    check: (obj) => obj <= value,
  );

  return this;
}