getInputMaxLength function

int? getInputMaxLength(
  1. dynamic input
)

Implementation

int? getInputMaxLength(input) {
  assert(isInputElement(input));
  return switch(input) {
    HTMLInputElement _ when input.isA<HTMLInputElement>() => input.maxLength,
    HTMLTextAreaElement _ when input.isA<HTMLTextAreaElement>() => input.maxLength,
    _ => null
  };
}