isDocFile static method

bool isDocFile(
  1. String filename
)

Checks if the given filename corresponds to a document file.

Parameters:

  • filename: The name of the file to check.

Returns:

  • A boolean indicating whether the file is a document file.

Implementation

static bool isDocFile(String filename) {
  return filename.endsWith(".doc") || filename.endsWith(".docx");
}