max method

DoubleType max(
  1. double value
)

allow only values <= value value the maximum value

Implementation

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

  return this;
}