isWord method Null safety

bool isWord(
  1. String filePath
)

Checks if string is an word file.

Implementation

static bool isWord(String filePath) {
  final ext = filePath.toLowerCase();

  return ext.endsWith(".doc") || ext.endsWith(".docx");
}