isFileName method

bool isFileName(
  1. String valueCandidate
)

Checks if the provided value is a valid file name.

Parameters:

  • valueCandidate The string to be evaluated.

Returns:

A boolean indicating whether the value is a valid file name.

Implementation

bool isFileName(String valueCandidate) {
  return regex.hasMatch(valueCandidate);
}